diff --git a/packages/web/src/components/layout/MobileShell.tsx b/packages/web/src/components/layout/MobileShell.tsx index 9cfddd31..ed4b573c 100644 --- a/packages/web/src/components/layout/MobileShell.tsx +++ b/packages/web/src/components/layout/MobileShell.tsx @@ -17,7 +17,7 @@ const PlaceholderScreen = ({ label }: { label: string }) => ( import { MobileSpacesScreen } from './MobileSpacesScreen'; // These will be replaced with real imports as each task is completed: import { MobileDmsScreen } from './MobileDmsScreen'; -const MobileYouScreen = () => ; +import { MobileYouScreen } from './MobileYouScreen'; import { MobileChatScreen } from './MobileChatScreen'; const MobileSettingsScreen = ({ initialPanel: _p }: { initialPanel?: string }) => ; const MobileVoiceMiniBar = () => null; diff --git a/packages/web/src/components/layout/MobileYouScreen.tsx b/packages/web/src/components/layout/MobileYouScreen.tsx new file mode 100644 index 00000000..5a160167 --- /dev/null +++ b/packages/web/src/components/layout/MobileYouScreen.tsx @@ -0,0 +1,155 @@ +import React, { useState } from 'react'; +import { useUIStore } from '../../stores/uiStore'; +import { useAuthStore } from '../../stores/authStore'; +import { Avatar } from '../ui/Avatar'; +import { ConfirmDialog } from '../ui/ConfirmDialog'; + +export function MobileYouScreen() { + const pushMobileScreen = useUIStore((s) => s.pushMobileScreen); + const user = useAuthStore((s) => s.user); + const logout = useAuthStore((s) => s.logout); + const [showLogoutConfirm, setShowLogoutConfirm] = useState(false); + + if (!user) return null; + + const avatarUrl = user.avatar ? `/api/uploads/${user.avatar}` : null; + const bannerUrl = user.banner ? `/api/uploads/${user.banner}` : null; + + const actionRows = [ + { + label: 'Edit Profile', + icon: ( + + + + ), + action: () => pushMobileScreen('settings-account'), + }, + { + label: 'Friends', + icon: ( + + + + ), + action: () => pushMobileScreen('friends'), + }, + { + label: 'Connections', + icon: ( + + + + ), + action: () => pushMobileScreen('settings-connections'), + }, + { + label: 'Voice & Audio', + icon: ( + + + + ), + action: () => pushMobileScreen('settings-voice'), + }, + ]; + + return ( +
+ {/* Header with settings gear */} +
+ +
+ + {/* Profile card */} +
+ {/* Banner or accent background */} +
+ + {/* Avatar overlay */} +
+
+ +
+
+ + {/* User info */} +
+

+ {user.displayName ?? user.username} +

+

@{user.username}

+ {user.customStatus && ( +

{user.customStatus}

+ )} + {user.bio && ( +

{user.bio}

+ )} +
+
+ + {/* Action rows */} +
+ {actionRows.map((row, i) => ( + + ))} +
+ + {/* Log out */} +
+ +
+ + {showLogoutConfirm && ( + { setShowLogoutConfirm(false); logout(); }} + onCancel={() => setShowLogoutConfirm(false)} + destructive + /> + )} +
+ ); +}