diff --git a/frontend/src/views/Upstreams.vue b/frontend/src/views/Upstreams.vue
index e461e31..3094a23 100644
--- a/frontend/src/views/Upstreams.vue
+++ b/frontend/src/views/Upstreams.vue
@@ -402,7 +402,7 @@
-
+
{{ keyStatusLabel(row.status) }}
@@ -513,10 +513,7 @@
- 新创建
- 已存在
- 待回填
- 失败
+ {{ keyStatusLabel(row.status) }}
@@ -1052,7 +1049,25 @@ function shrinkError(value: string) {
return value.length > 40 ? `${value.slice(0, 40)}…` : value
}
-const keyStatusLabel = (s: string) => ({ created: '已创建', imported: '已导入', import_failed: '导入失败', failed: '失败', created_pending_key: '待回填' }[s] || s)
+const keyStatusLabel = (s: string) => ({
+ created: '已创建',
+ exists: '已存在',
+ imported: '已导入',
+ orphaned: '远端缺失',
+ remote: '远端存在',
+ replaced: '已替换',
+ created_pending_key: '待回填',
+ failed: '失败',
+ import_failed: '导入失败',
+}[s] || '未知状态')
+
+const keyStatusTagType = (s: string) => {
+ if (s === 'created' || s === 'imported') return 'success'
+ if (s === 'exists' || s === 'remote') return 'info'
+ if (s === 'orphaned' || s === 'replaced' || s === 'created_pending_key') return 'warning'
+ if (s === 'failed' || s === 'import_failed') return 'danger'
+ return 'info'
+}
async function loadList() {
tableLoading.value = true
diff --git a/frontend/src/views/Websites.vue b/frontend/src/views/Websites.vue
index 2201740..f9f86dd 100644
--- a/frontend/src/views/Websites.vue
+++ b/frontend/src/views/Websites.vue
@@ -789,7 +789,7 @@
清理后重建
已存在
缺少 Key
- 失败
+ {{ keyStatusLabel(row.status) }}
@@ -1170,6 +1170,7 @@ const syncingImportStatus = ref(false)
const reorderingPriorities = ref(false)
const statusLabel = (s: string) => ({ healthy: '健康', unhealthy: '异常', unknown: '未知' }[s] || s)
+const keyStatusLabel = (s: string) => ({ created: '已创建', exists: '已存在', imported: '已导入', orphaned: '远端缺失', failed: '失败', import_failed: '导入失败', recreated: '清理后重建', missing_key: '缺少 Key' }[s] || '未知状态')
const algorithmLabel = (s: string) => ({ max_plus_percent: '最高倍率', average_plus_percent: '平均倍率', min_plus_percent: '最低倍率', priority_weighted_plus_percent: '自动保底盈利' }[s] || s)
const toUTC = (t: string) => /[Z+\-]\d*$/.test(t.trim()) ? t : t + 'Z'
const fmtTime = (t: string) => dayjs(toUTC(t)).format('MM-DD HH:mm:ss')