fix: i18n, password edit, and key count issues

- Add i18n to all components (zh-CN/en)
- Fix password not showing when editing connection
- Fix key count showing 0 by adding getInfo function
This commit is contained in:
2026-07-04 22:26:32 +08:00
parent 86b0eff95b
commit 3b402771d5
13 changed files with 155 additions and 100 deletions
+6 -4
View File
@@ -1,9 +1,11 @@
<script setup lang="ts">
// src/renderer/src/components/StatusView.vue
// src/components/StatusView.vue
import { ref, onMounted } from 'vue'
import { useConnectionStore } from '@renderer/stores/connection'
import { useI18n } from '@renderer/i18n'
const connStore = useConnectionStore()
const { t } = useI18n()
const info = ref('')
const dbSize = ref(0)
@@ -55,16 +57,16 @@ defineExpose({ refresh })
<div class="status-view" v-if="connStore.activeConnection">
<div class="status-header">
<h2>{{ connStore.activeConnection.name }}</h2>
<el-button size="small" @click="refresh">Refresh</el-button>
<el-button size="small" @click="refresh">{{ t('common.refresh') }}</el-button>
</div>
<div class="info-grid">
<div class="info-card">
<div class="info-label">Database</div>
<div class="info-label">{{ t('status.database') }}</div>
<div class="info-value">{{ connStore.activeConnection.host }}:{{ connStore.activeConnection.port }}</div>
</div>
<div class="info-card">
<div class="info-label">Keys</div>
<div class="info-label">{{ t('status.keys') }}</div>
<div class="info-value">{{ dbSize.toLocaleString() }}</div>
</div>
</div>