登录页与激活页互加入口链接

孩子设备打开网站落在登录页,原先没有去激活页的路径,补上双向链接。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-08-02 23:34:19 +08:00
co-authored by Claude Opus 4.8
parent 9dd0c66237
commit b08f6649be
2 changed files with 20 additions and 0 deletions
+10
View File
@@ -1,6 +1,7 @@
"use client"; "use client";
import { useActionState } from "react"; import { useActionState } from "react";
import Link from "next/link";
import { activate } from "./actions"; import { activate } from "./actions";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
@@ -42,6 +43,15 @@ export default function JoinPage() {
<Button type="submit" className="w-full" size="lg" disabled={pending}> <Button type="submit" className="w-full" size="lg" disabled={pending}>
{pending ? "激活中…" : "激活"} {pending ? "激活中…" : "激活"}
</Button> </Button>
<p className="text-center text-sm text-muted-foreground">
我是家长,{" "}
<Link
href="/login"
className="font-medium text-primary underline-offset-4 hover:underline"
>
去登录
</Link>
</p>
</form> </form>
</CardContent> </CardContent>
</Card> </Card>
+10
View File
@@ -1,6 +1,7 @@
"use client"; "use client";
import { useActionState } from "react"; import { useActionState } from "react";
import Link from "next/link";
import { login } from "./actions"; import { login } from "./actions";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
@@ -47,6 +48,15 @@ export default function LoginPage() {
<Button type="submit" className="w-full" size="lg" disabled={pending}> <Button type="submit" className="w-full" size="lg" disabled={pending}>
{pending ? "登录中…" : "登录"} {pending ? "登录中…" : "登录"}
</Button> </Button>
<p className="text-center text-sm text-muted-foreground">
孩子的设备第一次使用?{" "}
<Link
href="/join"
className="font-medium text-primary underline-offset-4 hover:underline"
>
去输入激活码
</Link>
</p>
</form> </form>
</CardContent> </CardContent>
</Card> </Card>