feat(profile)!: replace sidebar and add avatar navigation
Rename the global Sidebar route, UI, assets, analytics, and payment return context to Profile. Add accessible message-avatar navigation and preserve the source character across auth and logout flows. BREAKING CHANGE: /sidebar has been removed; use /profile instead.
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
/**
|
||||
* ChatHeader 顶部栏
|
||||
*
|
||||
* 图标:lucide-react <Lock />(游客 banner)+ <Menu />(菜单按钮)
|
||||
* 图标:lucide-react <Lock />(游客 banner)+ <UserRound />(Profile)
|
||||
* tree-shakable,currentColor 继承父 color
|
||||
*/
|
||||
import type { ReactNode } from "react";
|
||||
import { Lock, Menu } from "lucide-react";
|
||||
import { Lock, UserRound } from "lucide-react";
|
||||
|
||||
import { BackButton } from "@/app/_components";
|
||||
import { useActiveCharacterRoutes } from "@/providers/character-provider";
|
||||
@@ -74,17 +74,17 @@ export function ChatHeader({
|
||||
|
||||
<button
|
||||
type="button"
|
||||
data-analytics-key="chat.open_menu"
|
||||
data-analytics-label="Open chat menu"
|
||||
data-analytics-key="chat.open_profile"
|
||||
data-analytics-label="Open profile"
|
||||
className="flex size-(--responsive-icon-button-size,42px) cursor-pointer items-center justify-center rounded-full border border-[rgba(255,255,255,0.12)] bg-[rgba(13,11,20,0.7)] text-(--color-text-primary,#fff) shadow-[0_10px_24px_rgba(0,0,0,0.2)] backdrop-blur-md transition-[background,transform] duration-150 hover:bg-[rgba(28,24,39,0.82)] active:scale-96 focus-visible:outline-2 focus-visible:outline-offset-3 focus-visible:outline-[#f657a0]"
|
||||
onClick={() =>
|
||||
navigator.push(
|
||||
buildGlobalPageUrl(ROUTES.sidebar, characterRoutes.chat),
|
||||
buildGlobalPageUrl(ROUTES.profile, characterRoutes.chat),
|
||||
)
|
||||
}
|
||||
aria-label="Menu"
|
||||
aria-label="Profile"
|
||||
>
|
||||
<Menu size={24} aria-hidden="true" />
|
||||
<UserRound size={24} aria-hidden="true" />
|
||||
</button>
|
||||
</>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user