Add authenticated login and SSO protection

This commit is contained in:
inman
2026-05-29 15:54:13 +08:00
parent e36f28a668
commit 0648874801
50 changed files with 1853 additions and 63 deletions

View File

@@ -28,6 +28,7 @@ type SettingsPayload = {
visual: string;
evolink: string;
seedance: string;
auth: string;
data: string;
};
capabilities: Array<{
@@ -219,6 +220,7 @@ export function SettingsPanel() {
<ServiceBadge label="即梦" value={payload?.modes.visual === "real" ? "真实接口" : "Mock"} ready={payload?.modes.visual === "real"} />
<ServiceBadge label="EvoLink" value={payload?.modes.evolink === "real" ? "真实接口" : "Mock"} ready={payload?.modes.evolink === "real"} />
<ServiceBadge label="Seedance" value={payload?.modes.seedance === "real" ? "真实接口" : "Mock"} ready={payload?.modes.seedance === "real"} />
<ServiceBadge label="账户" value={authModeLabel(payload?.modes.auth)} ready={payload?.modes.auth === "configured"} />
<ServiceBadge label="数据层" value={payload?.modes.data === "supabase" ? "Supabase" : "本地 JSON"} ready={false} />
</div>
@@ -282,7 +284,14 @@ function ServiceBadge({ label, value, ready }: { label: string; value: string; r
);
}
function authModeLabel(mode?: string) {
if (mode === "configured") return "已启用";
if (mode === "missing") return "待配置";
return "未启用";
}
function shortGroupLabel(id: string, title: string) {
if (id === "auth") return "登录";
if (id === "visual") return "图片";
if (id === "evolink") return "EvoLink";
if (id === "seedance") return "视频";