import { useCallback } from "react"; import { useConfigStore } from "@/stores/configStore"; import { Switch, Input } from "@heroui/react"; import { ShieldCheck } from "lucide-react"; import { SettingCard, SettingRow, PageHeader, SectionTitle } from "@/components/setting"; export function SecurityIdSetting() { const enabled = useConfigStore((s) => s.config.network.securityId.enabled); const authUrl = useConfigStore((s) => s.config.network.securityId.authUrl); const setNetwork = useConfigStore((s) => s.setNetwork); const handleToggle = useCallback((v: boolean) => { setNetwork({ securityId: { enabled: v, authUrl: "" } }); }, [setNetwork]); const handleUrlChange = useCallback((e: React.ChangeEvent) => { setNetwork({ securityId: { enabled: true, authUrl: e.target.value } }); }, [setNetwork]); return (
认证服务
{enabled && (

认证服务器 URL

输入第三方认证服务的地址

)}
); }