Localize key status labels
This commit is contained in:
@@ -789,7 +789,7 @@
|
||||
<el-tag v-else-if="row.status === 'recreated'" size="small" type="warning">清理后重建</el-tag>
|
||||
<el-tag v-else-if="row.status === 'exists'" size="small" type="info">已存在</el-tag>
|
||||
<el-tag v-else-if="row.status === 'missing_key'" size="small" type="danger">缺少 Key</el-tag>
|
||||
<el-tag v-else size="small" type="danger">失败</el-tag>
|
||||
<el-tag v-else size="small" type="danger">{{ keyStatusLabel(row.status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="message" label="说明/原因" min-width="150">
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user