fix(auth): 访客工作台 - 欢迎页关闭后展示创作界面 (#697)

Co-authored-by: a0 <a0@Mac-mini.local>
This commit is contained in:
esncy
2026-10-07 08:47:55 +08:00
committed by GitHub
parent b17877605e
commit 2b3c6ceeaa
10 changed files with 126 additions and 28 deletions

View File

@@ -70,7 +70,7 @@ function WorkspaceSidebarProfile({ collapsed, user }: { collapsed: boolean; user
useEffect(() => setFailed(false), [avatarUrl]);
if (!user) {
return <Link to="/login" className={cn("app-workspace-sidebar-profile", collapsed && "is-collapsed")} aria-label="登录" title="登录"><CircleUserRound className="size-5" /><span>登录</span></Link>;
return <div className={cn("app-workspace-sidebar-profile", collapsed && "is-collapsed")} role="img" aria-label="游客模式" title="游客模式"><span className="app-workspace-sidebar-profile-avatar"><CircleUserRound aria-hidden /></span>{!collapsed ? <span>游客模式</span> : null}</div>;
}
const avatar = avatarUrl && !failed ? <img src={avatarUrl} alt="" referrerPolicy="no-referrer" onError={() => setFailed(true)} /> : <CircleUserRound aria-hidden />;