修改登录逻辑

This commit is contained in:
2026-07-06 15:54:27 +08:00
parent fe66794168
commit 53b1842de8
12 changed files with 198 additions and 28 deletions

View File

@@ -29,6 +29,8 @@ export default async function LoginPage({
configured={config.configured}
message={message}
missing={!config.configured && config.required ? config.missing : []}
alternateHref={loginHref("/auth/admin-login", next)}
alternateLabel="管理员登录"
/>
);
}
@@ -36,3 +38,7 @@ export default async function LoginPage({
function singleParam(value: string | string[] | undefined): string | undefined {
return Array.isArray(value) ? value[0] : value;
}
function loginHref(path: string, next: string): string {
return `${path}?next=${encodeURIComponent(next)}`;
}