fix(web): 后端不可用统一用 BackendDownNotice 替代 404/手搓提示

This commit is contained in:
Yaojia Wang
2026-06-29 16:52:43 +02:00
parent f8cabc92e6
commit 47eb42f274
6 changed files with 52 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
import { AppShell } from "@/components/AppShell";
import { BackendDownNotice } from "@/components/BackendDownNotice";
import { ProvidersSettings } from "@/components/settings/ProvidersSettings";
import { PageHeader } from "@/components/ui/PageHeader";
import { fetchKimiOauthStatus, fetchProviders } from "@/lib/api/server";
@@ -34,9 +35,7 @@ export default async function ProvidersSettingsPage() {
description="配置写手、分析、轻量三类能力档位的路由,并管理 API Key 与 Kimi Code OAuth。"
/>
{loadError ? (
<p className="rounded border border-conflict bg-panel p-6 text-conflict">
API
</p>
<BackendDownNotice />
) : (
<ProvidersSettings initial={initial} kimiOauth={kimiOauth} />
)}