feat: three-mode display (player/master/both) with master auto-tick

- Add `mode` setting to replace legacy `masterMode` with migration path
- Implement 3-button display mode picker (player-only, master-only, both)
- Auto-increment master when card drawn via call-bus event system
- Add voice hint on settings button, gate auto-call on mode changes
- Broadcast draw events from MasterPanel, reset call-bus on new game
- Broadened announce condition to cover both modes
- New call-bus.svelte.js module for event coordination
- Update settings-store tests to cover mode migration
- Update codebase docs for mode setting and call-bus architecture
This commit is contained in:
tiennm99 committed 2026-04-27 10:51:08 +07:00
1 parent 7d1bb5e68a
commit d08f25bd96
17 files changed
+937 -101

No files matched your search

+10
View File
@@ -62,6 +62,16 @@ All colors have corresponding `dark:` variants. Tailwind's `prefers-color-scheme
- **Max width**: `max-w-lg` (player), `max-w-2xl` (host) — centered with `mx-auto`.
- **Flex wrap**: Use `flex flex-wrap gap-1.5` for number history chips.
## Settings & UI Toggles
### Mode Picker (SettingsButton)
Three-way toggle in settings modal:
- **Player mode** (`mode: "player"`) — PlayerBoard only, default UX for players
- **Master mode** (`mode: "master"`) — MasterPanel only, host-only view (e.g., projector)
- **Both mode** (`mode: "both"`) — PlayerBoard + MasterPanel stacked inline, master auto-ticks player board on draw
Mode selection is persisted to localStorage and applied immediately.
## Component Patterns
### Button Styles