feat(ui): lobby site-style sidebar + profile screen (#47)
- Wrap lobby and profile in a shared `lobby-shell.svelte` chrome: page-list sidebar (Overview/Profile) and a top "Player-xxxx" identity strip mirroring the project site's monospace look. - Strip the legacy `lobby.title`, device-session-id `<code>`, and `lobby.greeting` paragraph; the identity strip both names the user and opens the profile editor. - Add a top-level `profile` AppScreen with a three-field form (`display_name`, `preferred_language`, `time_zone`) backed by a new `src/api/account.ts` wrapper around `user.account.get`, `user.profile.update`, and `user.settings.update`. Saving switches the active i18n locale in-place when the new preferred language is one the UI ships translations for. - Update e2e fixture + auth-flow / lobby-flow specs to use the new `lobby-account-name` testid and wait for the loaded identity before releasing pending `SubscribeEvents` (webkit revocation race). New `profile-screen.spec.ts` covers navigation, edit-save, and cancel. - Sync `ui/docs/lobby.md` and `ui/docs/navigation.md` to the new layout. Closes #47
This commit is contained in:
@@ -7,7 +7,7 @@ declare global {
|
||||
// (and active game) live in `page.state` so browser Back/Forward
|
||||
// move between screens while the address bar stays at /game/.
|
||||
interface PageState {
|
||||
screen?: "login" | "lobby" | "lobby-create" | "game";
|
||||
screen?: "login" | "lobby" | "lobby-create" | "profile" | "game";
|
||||
gameId?: string | null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user