Skip to content

Commit 650ce2d

Browse files
committed
style: optimize the display of time
1 parent e8e10f1 commit 650ce2d

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828
},
2929
"license": "MIT",
3030
"devDependencies": {
31-
"@crowdin/crowdin-api-client": "^1.48.3",
31+
"@crowdin/crowdin-api-client": "^1.49.0",
3232
"@emotion/babel-plugin": "^11.13.5",
3333
"@emotion/css": "^11.13.5",
34-
"@rsdoctor/rspack-plugin": "^1.3.8",
35-
"@rspack/cli": "^1.6.1",
36-
"@rspack/core": "^1.6.1",
34+
"@rsdoctor/rspack-plugin": "^1.3.9",
35+
"@rspack/cli": "^1.6.3",
36+
"@rspack/core": "^1.6.3",
3737
"@swc/core": "^1.15.1",
3838
"@swc/jest": "^0.2.39",
39-
"@types/chrome": "0.1.27",
39+
"@types/chrome": "0.1.28",
4040
"@types/decompress": "^4.2.7",
4141
"@types/jest": "^30.0.0",
42-
"@types/node": "^24.10.0",
42+
"@types/node": "^24.10.1",
4343
"@types/punycode": "^2.1.4",
4444
"@vue/babel-plugin-jsx": "^2.0.1",
4545
"babel-loader": "^10.0.0",
@@ -54,7 +54,7 @@
5454
"postcss": "^8.5.6",
5555
"postcss-loader": "^8.2.0",
5656
"postcss-rtlcss": "^5.7.1",
57-
"puppeteer": "^24.29.1",
57+
"puppeteer": "^24.30.0",
5858
"ts-loader": "^9.5.4",
5959
"ts-node": "^10.9.2",
6060
"tsconfig-paths": "^4.2.0",

src/pages/app/components/Habit/components/Site/Summary.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ const _default = defineComponent(() => {
5858
const isXs = useXsState()
5959

6060
return () => (
61-
<Flex
62-
flex={isXs.value ? undefined : 4}
63-
column gap={1}
64-
>
61+
<Flex flex={isXs.value ? undefined : 4} column gap={1}>
6562
<KanbanIndicatorCell
6663
mainName={t(msg => msg.analysis.common.focusTotal)}
6764
mainValue={periodFormatter(summary.value?.focus?.total, { format: filter.timeFormat })}
@@ -74,7 +71,7 @@ const _default = defineComponent(() => {
7471
mainName={t(msg => msg.habit.site.countTotal)}
7572
mainValue={computeCountText(summary.value?.count)}
7673
subTips={msg => msg.habit.site.siteAverage}
77-
subValue={summary.value?.count?.siteAverage?.toFixed(0) || '-'}
74+
subValue={summary.value?.count?.siteAverage?.toFixed(1) ?? '-'}
7875
subInfo={summary.value?.exclusiveToday4Average ? t(msg => msg.habit.site.exclusiveToday) : undefined}
7976
containerStyle={GRID_CELL_STYLE}
8077
/>

src/pages/app/util/time.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ type PeriodFormatOption = {
3030
}
3131

3232
const UNIT_MAP: { [unit in Exclude<timer.app.TimeFormat, 'default'>]: string } = {
33-
second: ' s',
34-
minute: ' m',
35-
hour: ' h',
33+
second: 's',
34+
minute: 'm',
35+
hour: 'h',
3636
}
3737

3838
/**

0 commit comments

Comments
 (0)