From e603b67bdb959dd32089cb7a733cdf9eca0a533f Mon Sep 17 00:00:00 2001 From: erio Date: Sun, 8 Mar 2026 21:21:28 +0800 Subject: [PATCH] fix(frontend): restore quota badges to capacity column and rename usage label to total - Restore QuotaBadge (D/W/total) back to the capacity column - Rename usage window total label from "$" to "total" --- .../components/account/AccountCapacityCell.vue | 17 +++++++++++++++++ .../src/components/account/AccountUsageCell.vue | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/account/AccountCapacityCell.vue b/frontend/src/components/account/AccountCapacityCell.vue index d3042f98ca..3792e3a7a9 100644 --- a/frontend/src/components/account/AccountCapacityCell.vue +++ b/frontend/src/components/account/AccountCapacityCell.vue @@ -30,6 +30,11 @@ + + + + + @@ -39,6 +44,7 @@ import { useI18n } from 'vue-i18n' import type { Account } from '@/types' import CapacityBadge from '@/components/account/CapacityBadge.vue' import AffinityBadge from '@/components/account/AffinityBadge.vue' +import QuotaBadge from '@/components/account/QuotaBadge.vue' const props = defineProps<{ account: Account @@ -195,4 +201,15 @@ const formatCost = (value: number | null | undefined) => { if (value === null || value === undefined) return '0' return value.toFixed(2) } + +// ====== 配额 ====== +const showDailyQuota = computed(() => + props.account.type === 'apikey' && props.account.quota_daily_limit != null && props.account.quota_daily_limit > 0 +) +const showWeeklyQuota = computed(() => + props.account.type === 'apikey' && props.account.quota_weekly_limit != null && props.account.quota_weekly_limit > 0 +) +const showTotalQuota = computed(() => + props.account.type === 'apikey' && props.account.quota_limit != null && props.account.quota_limit > 0 +) diff --git a/frontend/src/components/account/AccountUsageCell.vue b/frontend/src/components/account/AccountUsageCell.vue index a696383990..c354a0bcef 100644 --- a/frontend/src/components/account/AccountUsageCell.vue +++ b/frontend/src/components/account/AccountUsageCell.vue @@ -354,7 +354,7 @@ />