From 3c560b9276d5103ee3f08dbf3560d341de415876 Mon Sep 17 00:00:00 2001 From: Zyy Date: Thu, 3 Dec 2026 17:59:10 +0800 Subject: [PATCH] fix(ui): unify account subscription badges Use compact badges in the dashboard and switch account rows to a stacked layout when the card is narrow. Co-authored-by: Codex --- .../src/components/account-plan-badge/index.vue | 15 ++++++++------- .../components/account-quota-panel/index.vue | 2 +- .../account-overview/DashboardAccountIdentity.vue | 2 +- .../components/account-overview/index.vue | 14 +++++++------- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/account-plan-badge/index.vue b/frontend/src/components/account-plan-badge/index.vue index 970d7b2e2..18fa4481d 100644 --- a/frontend/src/components/account-plan-badge/index.vue +++ b/frontend/src/components/account-plan-badge/index.vue @@ -66,10 +66,11 @@ const sizes = { md: { text: 'text-z-xs font-heavy', singleLine: 'h-5.5 px-2' }, } -const paletteClass = computed(() => { +const appearanceClasses = computed(() => { const key = props.planType?.trim().toLowerCase() || '' - return planPalettes.get(displayText.value?.trim().toLowerCase() || key) + const palette = planPalettes.get(displayText.value?.trim().toLowerCase() || key) ?? fallbackPalettes[stableVisualIndex(key, fallbackPalettes.length)] + return ['rounded-md', palette] }) @@ -77,18 +78,18 @@ const paletteClass = computed(() => { - + {{ displayText }} {{ count }} {{ displayText }} {{ count }} diff --git a/frontend/src/views/accounts/components/account-quota-panel/index.vue b/frontend/src/views/accounts/components/account-quota-panel/index.vue index b6a135e1c..a53f4c5f6 100644 --- a/frontend/src/views/accounts/components/account-quota-panel/index.vue +++ b/frontend/src/views/accounts/components/account-quota-panel/index.vue @@ -85,7 +85,7 @@ watch(hasPersonalInfo, (available) => { v-if="(account.capabilities.quota || quotaEntries.length > 0 || account.upstream?.discovered) && (hasPlanBadge || lastRefreshed)" class="col-span-2 row-start-2 m-0 flex min-w-0 items-center gap-1.5 text-z-xs font-emphasis text-z-text-secondary" > - + {{ lastRefreshed }}

diff --git a/frontend/src/views/dashboard/components/account-overview/DashboardAccountIdentity.vue b/frontend/src/views/dashboard/components/account-overview/DashboardAccountIdentity.vue index 1989a1d86..47f3dfba3 100644 --- a/frontend/src/views/dashboard/components/account-overview/DashboardAccountIdentity.vue +++ b/frontend/src/views/dashboard/components/account-overview/DashboardAccountIdentity.vue @@ -52,7 +52,7 @@ const avatarToneClass = computed(() => {{ displayTitle }} - + {