From 393c82c87926527e882f14e975c300794543ec51 Mon Sep 17 00:00:00 2001 From: Jokul Date: Sat, 4 Jul 2026 23:48:27 +0800 Subject: [PATCH] feat: StatusView i18n + 1s auto-refresh - Section titles (Server, Clients, Memory...) follow app language - Auto-refresh every 1 second - Clean up interval on unmount/disconnect --- src/components/StatusView.vue | 58 +++++++++++++++++++++++++++++++++-- src/i18n/locales/en.ts | 11 +++++++ src/i18n/locales/zh-CN.ts | 11 +++++++ 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/src/components/StatusView.vue b/src/components/StatusView.vue index f507ffa..965686c 100644 --- a/src/components/StatusView.vue +++ b/src/components/StatusView.vue @@ -1,6 +1,6 @@ @@ -73,7 +125,7 @@ defineExpose({ refresh })
-

{{ section.title }}

+

{{ translateSectionTitle(section.title) }}

{{ item.key }} diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 152a10a..c57485d 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -129,6 +129,17 @@ export default { connecting: 'Connecting...', error: 'Error: {error}', noConnection: 'No connection', + sectionServer: 'Server', + sectionClients: 'Clients', + sectionMemory: 'Memory', + sectionPersistence: 'Persistence', + sectionStats: 'Stats', + sectionReplication: 'Replication', + sectionCpu: 'CPU', + sectionModules: 'Modules', + sectionErrorstats: 'Errorstats', + sectionCluster: 'Cluster', + sectionKeyspace: 'Keyspace', }, db: { label: 'DB', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 78f369e..10f3d51 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -129,6 +129,17 @@ export default { connecting: '连接中...', error: '错误: {error}', noConnection: '无连接', + sectionServer: '服务器', + sectionClients: '客户端', + sectionMemory: '内存', + sectionPersistence: '持久化', + sectionStats: '统计', + sectionReplication: '复制', + sectionCpu: 'CPU', + sectionModules: '模块', + sectionErrorstats: '错误统计', + sectionCluster: '集群', + sectionKeyspace: '键空间', }, db: { label: '数据库',