feat(sidebar): show user info with three-state UI (guest/member/vip)
Sidebar screen now primarily displays user-related information and derives three render states from loginStatus + currentUser.isVip: - guest (notLoggedIn): welcome panel + Sign in / Sign up entries - member (logged in, no VIP): user info card + Get VIP CTA + Log out - vip (logged in, VIP): user info card with VIP badge + Manage VIP CTA + Log out Adds UserView.isVip (default false), patches user-machine.toView() to populate it, and introduces three presentational components (GuestPanel, UserInfoCard, VipCta) co-located under src/app/sidebar. Preserves existing UserInit + logout-redirect behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,7 @@ function toView(u: {
|
||||
relationshipStage?: string;
|
||||
currentMood?: string;
|
||||
isGuest?: boolean;
|
||||
isVip?: boolean;
|
||||
}): UserView {
|
||||
return {
|
||||
id: u.id,
|
||||
@@ -60,6 +61,7 @@ function toView(u: {
|
||||
relationshipStage: u.relationshipStage ?? "",
|
||||
currentMood: u.currentMood ?? "",
|
||||
isGuest: u.isGuest ?? false,
|
||||
isVip: u.isVip ?? false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user