Skip to content

Commit 2dee921

Browse files
committed
fix: 修复又长又臭的显示
1 parent a65b59c commit 2dee921

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"build": "tsc && tsup",
2626
"pub": "npm publish --access public",
2727
"sort": "npx sort-package-json",
28-
"dev": "tsx src/index.ts",
28+
"dev": "tsx src/app.ts",
2929
"watch": "tsx watch src/index.ts",
3030
"karin": "karin"
3131
},
3232
"devDependencies": {
3333
"@types/node": "^20.17.30",
3434
"eslint": "^9.24.0",
3535
"neostandard": "^0.12.1",
36-
"node-karin": "^1.7.14",
36+
"node-karin": "^1.8.12",
3737
"tsup": "^8.4.0",
3838
"tsx": "^4.19.3",
3939
"typescript": "^5.8.3"

src/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import('node-karin/start')

src/apps/status.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ const uptime = () => {
7474
const day = Math.floor(uptime / 86400)
7575
const hour = Math.floor((uptime % 86400) / 3600)
7676
const minute = Math.floor((uptime % 3600) / 60)
77-
const seconds = Math.floor(uptime % 60)
78-
return `${day}${hour}小时${minute}分钟${seconds}`
77+
78+
return `${day > 0 ? `${day}天` : ''}${hour}小时${minute}分钟`
7979
}
8080

8181
(() => {

0 commit comments

Comments
 (0)