mirror of
https://github.com/margrop/wrong-notebook.git
synced 2026-12-06 22:17:33 +08:00
- /setup 改为分步向导,AI 渠道复用设置页表单(未配置时推荐 MiniMax Code),错题本复用创建对话框,后两步可跳过 - 新增 /api/setup:未完成向导且没有错题本时管理员进入应用自动跳转,已在使用的实例升级后不打扰 - 完成状态写入 app-config.json 的 setupCompletedAt,「设置 → 用户管理」可重新运行向导 - AI 配置校验抽到 src/lib/ai-config-validation.ts 供设置页与向导共用 - E2E 准备脚本标记向导已完成,新增重新运行向导用例;同步更新 README、Wiki、安装包说明 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.5 KiB
TypeScript
34 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import Image from "next/image";
|
|
import { useLanguage } from "@/contexts/LanguageContext";
|
|
|
|
interface AuthShellProps {
|
|
children: React.ReactNode;
|
|
/** 内容较多的页面(如安装向导)用更宽的版心 */
|
|
wide?: boolean;
|
|
}
|
|
|
|
/** 登录、注册、安装向导页的外层:品牌标识 + 渐变背景 */
|
|
export function AuthShell({ children, wide = false }: AuthShellProps) {
|
|
const { t } = useLanguage();
|
|
|
|
return (
|
|
<div className="relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4">
|
|
<div className="pointer-events-none absolute -left-32 -top-32 h-96 w-96 rounded-full bg-indigo-400/25 blur-3xl" />
|
|
<div className="pointer-events-none absolute -bottom-40 -right-24 h-[28rem] w-[28rem] rounded-full bg-violet-400/20 blur-3xl" />
|
|
|
|
<div className={`relative w-full space-y-6 py-8 ${wide ? "max-w-xl" : "max-w-md"}`}>
|
|
<div className="flex flex-col items-center gap-3 text-center">
|
|
<Image src="/icons/icon.png" alt="" width={64} height={64} className="rounded-2xl shadow-lg shadow-indigo-500/30" priority unoptimized />
|
|
<div className="space-y-1">
|
|
<p className="text-xl font-bold tracking-tight">{t.pageTitle.base}</p>
|
|
<p className="text-sm text-muted-foreground">{t.app.subtitle}</p>
|
|
</div>
|
|
</div>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|