mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-20 02:55:08 +08:00
🐞 fix: 显示运行时长国际化
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
},
|
||||
"runningTime": {
|
||||
"title": "Uptime",
|
||||
"subtitle": "System uptime duration"
|
||||
"subtitle": "System uptime duration",
|
||||
"format": "{hours}h {minutes}m {seconds}s"
|
||||
},
|
||||
"memoryUsage": {
|
||||
"title": "Memory Usage",
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
},
|
||||
"runningTime": {
|
||||
"title": "运行时间",
|
||||
"subtitle": "系统已运行时长"
|
||||
"subtitle": "系统已运行时长",
|
||||
"format": "{hours}小时{minutes}分{seconds}秒"
|
||||
},
|
||||
"memoryUsage": {
|
||||
"title": "内存占用",
|
||||
|
||||
@@ -30,7 +30,16 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
formattedTime() {
|
||||
return this.stat?.running || this.t('status.loading');
|
||||
if (!this.stat?.running) {
|
||||
return this.t('status.loading');
|
||||
}
|
||||
|
||||
const { hours, minutes, seconds } = this.stat.running;
|
||||
return this.t('stats.runningTime.format', {
|
||||
hours,
|
||||
minutes,
|
||||
seconds
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user