Add authenticated login and SSO protection
This commit is contained in:
@@ -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 "视频";
|
||||
|
||||
Reference in New Issue
Block a user