From d505c5b2f2af52f56dbf4f51d20b9ea22ee5b252 Mon Sep 17 00:00:00 2001 From: ianshaw Date: Sat, 3 Jan 2026 17:10:37 -0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E7=8A=B6=E6=80=81=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=9B=BD=E9=99=85=E5=8C=96=E5=92=8C=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AccountStatusIndicator: 状态文本使用 i18n - CreateAccountModal: TypeScript 类型修复 - TempUnschedStatusModal: 错误处理改进 --- frontend/src/components/account/AccountStatusIndicator.vue | 2 +- frontend/src/components/account/CreateAccountModal.vue | 2 +- frontend/src/components/account/TempUnschedStatusModal.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/account/AccountStatusIndicator.vue b/frontend/src/components/account/AccountStatusIndicator.vue index 97e1a783..d4fbf682 100644 --- a/frontend/src/components/account/AccountStatusIndicator.vue +++ b/frontend/src/components/account/AccountStatusIndicator.vue @@ -171,7 +171,7 @@ const statusText = computed(() => { if (isRateLimited.value || isOverloaded.value) { return t('admin.accounts.status.limited') } - return props.account.status + return t(`common.${props.account.status}`) }) const handleTempUnschedClick = () => { diff --git a/frontend/src/components/account/CreateAccountModal.vue b/frontend/src/components/account/CreateAccountModal.vue index 95ad92a7..50bcf690 100644 --- a/frontend/src/components/account/CreateAccountModal.vue +++ b/frontend/src/components/account/CreateAccountModal.vue @@ -2460,7 +2460,7 @@ const handleCookieAuth = async (sessionKey: string) => { const accountName = keys.length > 1 ? `${form.name} #${i + 1}` : form.name // Merge interceptWarmupRequests into credentials - const credentials = { + const credentials: Record = { ...tokenInfo, ...(interceptWarmupRequests.value ? { intercept_warmup_requests: true } : {}) } diff --git a/frontend/src/components/account/TempUnschedStatusModal.vue b/frontend/src/components/account/TempUnschedStatusModal.vue index 05c82be7..b2c0b71b 100644 --- a/frontend/src/components/account/TempUnschedStatusModal.vue +++ b/frontend/src/components/account/TempUnschedStatusModal.vue @@ -210,7 +210,7 @@ const loadStatus = async () => { try { status.value = await adminAPI.accounts.getTempUnschedulableStatus(props.account.id) } catch (error: any) { - appStore.showError(error.response?.data?.detail || t('admin.accounts.tempUnschedulable.failedToLoad')) + appStore.showError(error?.message || t('admin.accounts.tempUnschedulable.failedToLoad')) status.value = null } finally { loading.value = false @@ -230,7 +230,7 @@ const handleReset = async () => { emit('reset') handleClose() } catch (error: any) { - appStore.showError(error.response?.data?.detail || t('admin.accounts.tempUnschedulable.resetFailed')) + appStore.showError(error?.message || t('admin.accounts.tempUnschedulable.resetFailed')) } finally { resetting.value = false }