From bc4728332ea47a01fa09a9a27686667fc4b98740 Mon Sep 17 00:00:00 2001 From: Zyy Date: Fri, 14 Aug 2026 01:24:49 +0800 Subject: [PATCH] fix(frontend): polish dashboard and table interactions Co-authored-by: Codex --- frontend/src/components/base/BaseButton.vue | 1 + .../layout/components/SystemUpdateModal.vue | 11 +++++++- .../src/views/account-groups/constants.ts | 4 +-- frontend/src/views/accounts/constants.ts | 4 +-- frontend/src/views/api-keys/constants.ts | 4 +-- .../components/AccountOverviewCard.vue | 25 ++++++------------- .../components/backup/BackupRecordsCard.vue | 2 +- 7 files changed, 26 insertions(+), 25 deletions(-) diff --git a/frontend/src/components/base/BaseButton.vue b/frontend/src/components/base/BaseButton.vue index 87c34cd08..44f96d75a 100644 --- a/frontend/src/components/base/BaseButton.vue +++ b/frontend/src/components/base/BaseButton.vue @@ -82,6 +82,7 @@ const loadingIndicatorStyle = computed(() => { const classes = computed(() => [ 'inline-flex items-center justify-center border-0 font-bold leading-[1.15] transition-[background-color,box-shadow,color,opacity,transform] duration-150 cursor-pointer outline-none motion-safe:active:translate-y-px motion-safe:active:scale-[0.985]', props.iconOnly ? iconOnlySizeClasses[props.size] : sizeClasses[props.size], + props.iconOnly ? 'shrink-0' : undefined, props.iconOnly ? '' : 'rounded-(--cp-button-radius-base)', 'focus-visible:ring-2 focus-visible:ring-(--cp-info-border) focus-visible:ring-offset-2 focus-visible:ring-offset-(--cp-bg-surface)', 'disabled:cursor-not-allowed disabled:transform-none disabled:bg-(--cp-disabled-bg) disabled:text-(--cp-disabled-text) disabled:shadow-none', diff --git a/frontend/src/layout/components/SystemUpdateModal.vue b/frontend/src/layout/components/SystemUpdateModal.vue index cd75b869d..9d73be472 100644 --- a/frontend/src/layout/components/SystemUpdateModal.vue +++ b/frontend/src/layout/components/SystemUpdateModal.vue @@ -91,8 +91,16 @@ const statusView = computed(() => { iconClass: 'text-(--cp-success)', } } + if (updateInfo.value) { + return { + label: '已是最新', + icon: CheckCircle2, + badge: 'bg-(--cp-success-bg) text-(--cp-success-text)', + iconClass: 'text-(--cp-success)', + } + } return { - label: updateInfo.value ? '已是最新' : '未检查', + label: '未检查', icon: CheckCircle2, badge: 'bg-(--cp-bg-muted) text-(--cp-text-secondary)', iconClass: 'text-(--cp-text-muted)', @@ -318,6 +326,7 @@ watch( [] diff --git a/frontend/src/views/accounts/constants.ts b/frontend/src/views/accounts/constants.ts index 837328cf4..c4329fb64 100644 --- a/frontend/src/views/accounts/constants.ts +++ b/frontend/src/views/accounts/constants.ts @@ -121,8 +121,8 @@ export const accountColumns = [ { key: 'actions', label: '操作', - width: '120px', - minWidth: '120px', + width: '136px', + minWidth: '136px', }, ] satisfies BaseTableColumn[] diff --git a/frontend/src/views/api-keys/constants.ts b/frontend/src/views/api-keys/constants.ts index 2cd32c9b2..a05e16f43 100644 --- a/frontend/src/views/api-keys/constants.ts +++ b/frontend/src/views/api-keys/constants.ts @@ -43,8 +43,8 @@ export const apiKeyColumns = [ { key: 'actions', label: '操作', - width: '172px', - minWidth: '172px', + width: '208px', + minWidth: '208px', headerClass: relaxedActionCellClass, cellClass: relaxedActionCellClass, }, diff --git a/frontend/src/views/dashboard/components/AccountOverviewCard.vue b/frontend/src/views/dashboard/components/AccountOverviewCard.vue index 2b75260de..9143cacd0 100644 --- a/frontend/src/views/dashboard/components/AccountOverviewCard.vue +++ b/frontend/src/views/dashboard/components/AccountOverviewCard.vue @@ -1,6 +1,6 @@ @@ -333,11 +324,11 @@ const statusBars = computed(() => { -
+
[] = [ { key: 'expiresAt', label: '过期时间', width: 170 }, { key: 'trigger', label: '触发方式', width: 100 }, { key: 'startedAt', label: '开始时间', width: 170 }, - { key: 'actions', label: '操作', width: 96, fixed: 'right' }, + { key: 'actions', label: '操作', width: 112, minWidth: 112, fixed: 'right' }, ] function triggerLabel(value: string): string {