Skip to content

Commit 9ccdb9c

Browse files
committed
feat(settings): UserMenu 加 /settings 入口
之前只做了 /settings 页面本身,没任何入口,用户只能手打 URL 才能访问。 在登录用户右上角 Avatar 下拉菜单里加一条「设置」,指向 /settings。 位置:账号信息下方、GitHub 切换/登出之上,符合常见产品 pattern。
1 parent 79d910e commit 9ccdb9c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

app/components/UserMenu.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use client";
22

3+
import Link from "next/link";
34
import {
45
Avatar,
56
AvatarFallback,
@@ -48,6 +49,15 @@ export function UserMenu({ user, provider, logout }: UserMenuProps) {
4849
) : null}
4950
</div>
5051

52+
{/* 设置入口:登录用户均可见,指向 /settings 偏好页 */}
53+
<Link
54+
href="/settings"
55+
className="block px-4 py-2 text-sm text-foreground transition hover:bg-muted"
56+
data-umami-event="user_menu_settings_click"
57+
>
58+
设置
59+
</Link>
60+
5161
{provider === "github" ? (
5262
<a
5363
href="https://github.com/logout"

0 commit comments

Comments
 (0)