diff --git a/frontend/src/i18n/locales/en/dashboard.ts b/frontend/src/i18n/locales/en/dashboard.ts index 02e1df3489..a2fa1a165b 100644 --- a/frontend/src/i18n/locales/en/dashboard.ts +++ b/frontend/src/i18n/locales/en/dashboard.ts @@ -451,6 +451,7 @@ export default { original: 'Original', billed: 'Billed', noRecords: 'No usage records found. Try adjusting your filters.', + statsUnavailable: 'Usage statistics unavailable', failedToLoad: 'Failed to load usage logs', noDataToExport: 'No data to export', exportSuccess: 'Usage data exported successfully', diff --git a/frontend/src/i18n/locales/zh/dashboard.ts b/frontend/src/i18n/locales/zh/dashboard.ts index 535da0dd46..3a2d43ab66 100644 --- a/frontend/src/i18n/locales/zh/dashboard.ts +++ b/frontend/src/i18n/locales/zh/dashboard.ts @@ -456,6 +456,7 @@ export default { original: '原始', billed: '计费', noRecords: '未找到使用记录,请尝试调整筛选条件。', + statsUnavailable: '用量统计暂不可用', failedToLoad: '加载使用记录失败', noDataToExport: '没有可导出的数据', exportSuccess: '使用数据导出成功', diff --git a/frontend/src/views/user/KeysView.vue b/frontend/src/views/user/KeysView.vue index df56222ca2..8f5e0f70c5 100644 --- a/frontend/src/views/user/KeysView.vue +++ b/frontend/src/views/user/KeysView.vue @@ -213,23 +213,25 @@
{{ t('keys.today') }}: - - ${{ (usageStats[row.id]?.today_actual_cost ?? 0).toFixed(4) }} + + ${{ usageStats[row.id].today_actual_cost.toFixed(4) }} + —
{{ t('keys.total') }}: - - ${{ (usageStats[row.id]?.total_actual_cost ?? 0).toFixed(4) }} + + ${{ usageStats[row.id].total_actual_cost.toFixed(4) }} + —
@@ -1599,6 +1601,7 @@ const loadApiKeys = async () => { abortController = controller const { signal } = controller loading.value = true + usageStats.value = {} usageLoading.value = false try { // Build filters diff --git a/frontend/src/views/user/UsageView.vue b/frontend/src/views/user/UsageView.vue index 688bc19817..0d17f36607 100644 --- a/frontend/src/views/user/UsageView.vue +++ b/frontend/src/views/user/UsageView.vue @@ -1,7 +1,11 @@