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 @@ />