From 7d9a2edf640bbff27e34c83c9386bfa67d90170d Mon Sep 17 00:00:00 2001 From: tbphp Date: Wed, 9 Sep 2026 14:01:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(web):=20=E7=B2=BE=E8=B0=83=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=86=B7=E5=8D=B4=E5=B1=95=E7=A4=BA=E4=B8=8E=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/app/router.ts | 2 +- .../components/ui/ModelCooldownDetails.vue | 77 ++++++++++----- web/src/features/groups/GroupsView.vue | 5 + .../credentials/GroupCredentialRecord.vue | 33 ++++--- .../credentials/GroupCredentialsTab.vue | 86 ++++++++++------- .../credentials/SubscriptionAccountCard.vue | 11 ++- .../monitor/HealthProblemCollection.vue | 96 ++++++++++++++++--- .../features/monitor/HealthSummaryStrip.vue | 19 ++-- web/src/i18n/locales/en-US/monitor.ts | 2 +- web/src/i18n/locales/ja-JP/monitor.ts | 2 +- web/src/i18n/locales/zh-CN/monitor.ts | 2 +- 11 files changed, 240 insertions(+), 95 deletions(-) diff --git a/web/src/app/router.ts b/web/src/app/router.ts index 81197478f..232023208 100644 --- a/web/src/app/router.ts +++ b/web/src/app/router.ts @@ -81,7 +81,7 @@ const routes: RouteRecordRaw[] = [ titleKey: 'shell.monitor', requiresAuth: true, primaryNav: 'monitor', - messageNamespaces: ['monitor'], + messageNamespaces: ['monitor', 'group', 'settings'], }, }), pageRoute(pageRouteNames.models, { diff --git a/web/src/components/ui/ModelCooldownDetails.vue b/web/src/components/ui/ModelCooldownDetails.vue index 2dbdb8854..6207d044d 100644 --- a/web/src/components/ui/ModelCooldownDetails.vue +++ b/web/src/components/ui/ModelCooldownDetails.vue @@ -9,50 +9,83 @@ const { locale, t } = useI18n() diff --git a/web/src/features/groups/GroupsView.vue b/web/src/features/groups/GroupsView.vue index 4d5fb867f..49834153d 100644 --- a/web/src/features/groups/GroupsView.vue +++ b/web/src/features/groups/GroupsView.vue @@ -569,6 +569,7 @@ function connectionTypeBadgeClass(type: ConnectionType): string { /> @@ -762,6 +763,10 @@ function connectionTypeBadgeClass(type: ConnectionType): string { gap: var(--space-2); } +.credential-health__model-cooldown { + justify-self: start; +} + .record-actions { display: flex; align-items: center; diff --git a/web/src/features/groups/credentials/GroupCredentialRecord.vue b/web/src/features/groups/credentials/GroupCredentialRecord.vue index c2d8ad35f..cdf88a3bd 100644 --- a/web/src/features/groups/credentials/GroupCredentialRecord.vue +++ b/web/src/features/groups/credentials/GroupCredentialRecord.vue @@ -163,12 +163,14 @@ function runMenuAction(action: 'test' | 'toggle' | 'restore' | 'remove'): void { {{ t('group.credentials.columns.status') }} - - {{ t(`group.credentials.effective.${item.effective_status}`) }} - - {{ - t('group.credentials.modelCooldown.count', { count: n(item.model_cooldowns.length) }) - }} +
+ + {{ t(`group.credentials.effective.${item.effective_status}`) }} + + {{ + t('group.credentials.modelCooldown.count', { count: n(item.model_cooldowns.length) }) + }} +
@@ -337,11 +339,12 @@ function runMenuAction(action: 'test' | 'toggle' | 'restore' | 'remove'): void { />
+ +
{{ t('group.credentials.diagnostics') }} -
{{ t('group.credentials.detailsFailure') }}
@@ -411,6 +414,13 @@ function runMenuAction(action: 'test' | 'toggle' | 'restore' | 'remove'): void { gap: 6px; } +.group-credential-record__status-badges { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 6px 8px; +} + .group-credential-record__weight-none { color: var(--color-text-faint); text-decoration: underline dotted; @@ -473,16 +483,16 @@ function runMenuAction(action: 'test' | 'toggle' | 'restore' | 'remove'): void { margin: 0; } -.group-credential-record__details dl div { +.group-credential-record__runtime-details > div { min-width: 0; } -.group-credential-record__details dt { +.group-credential-record__runtime-details dt { color: var(--color-text-faint); font-size: var(--text-label-xs); } -.group-credential-record__details dd { +.group-credential-record__runtime-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-family: var(--font-mono); @@ -643,7 +653,7 @@ function runMenuAction(action: 'test' | 'toggle' | 'restore' | 'remove'): void { } .group-credential-record__mask, - .group-credential-record__recent, + .group-credential-record__status, .group-credential-record__actions { grid-column: 1 / -1; } @@ -657,7 +667,6 @@ function runMenuAction(action: 'test' | 'toggle' | 'restore' | 'remove'): void { gap: 5px; } - .group-credential-record__recent, .group-credential-record__actions { border-top: 1px solid var(--color-border-subtle); padding-top: 11px; diff --git a/web/src/features/groups/credentials/GroupCredentialsTab.vue b/web/src/features/groups/credentials/GroupCredentialsTab.vue index 6131d19dc..9ede34ae0 100644 --- a/web/src/features/groups/credentials/GroupCredentialsTab.vue +++ b/web/src/features/groups/credentials/GroupCredentialsTab.vue @@ -9,6 +9,7 @@ import { Plus, RotateCcw, Search, + Timer, } from '@lucide/vue' import { useQuery, useQueryClient } from '@tanstack/vue-query' import { computed, onBeforeUnmount, ref, watch } from 'vue' @@ -1679,23 +1680,22 @@ async function runBatch( - + + diff --git a/web/src/features/groups/credentials/GroupCredentialsTab.vue b/web/src/features/groups/credentials/GroupCredentialsTab.vue index 9ede34ae0..e5e5efa58 100644 --- a/web/src/features/groups/credentials/GroupCredentialsTab.vue +++ b/web/src/features/groups/credentials/GroupCredentialsTab.vue @@ -9,7 +9,6 @@ import { Plus, RotateCcw, Search, - Timer, } from '@lucide/vue' import { useQuery, useQueryClient } from '@tanstack/vue-query' import { computed, onBeforeUnmount, ref, watch } from 'vue' @@ -265,10 +264,7 @@ const credentialTestDialogResult = computed(() => { } }) const hasChangedConditions = computed( - () => - filters.value.q !== undefined || - filters.value.status !== undefined || - filters.value.model_cooldown === true, + () => filters.value.q !== undefined || filters.value.status !== undefined, ) const statusSummaryItems = computed(() => { const summary = collection.value?.summary @@ -325,13 +321,7 @@ watch( ) watch( - () => [ - filters.value.status, - filters.value.q, - filters.value.page, - filters.value.page_size, - filters.value.model_cooldown, - ], + () => [filters.value.status, filters.value.q, filters.value.page, filters.value.page_size], () => { selectedIds.value = new Set() }, @@ -380,9 +370,7 @@ function updateRoute( } function setFilter( - patch: Partial< - Pick - >, + patch: Partial>, ): void { updateRoute({ ...filters.value, ...patch, page: 1 }) } @@ -467,7 +455,6 @@ function currentSelectionContext(): string { return JSON.stringify({ groupId: props.groupId, status: filters.value.status ?? null, - modelCooldown: filters.value.model_cooldown ?? false, query: filters.value.q ?? null, page: filters.value.page, pageSize: filters.value.page_size, @@ -1680,20 +1667,6 @@ async function runBatch( - -