Save active sessions in browser local storage
Joining a game now records the session (game ID, player ID, plus player/rat/crew names) in localStorage via the new lib/sessions.js, and the dashboard keeps it enriched as state loads (so the rat name tracks earned Names). The home page lists saved sessions in a "Rejoin a Crew" menu, most-recent first, alongside creating a new game. Deleting an entry only touches localStorage, never the backend, and is undoable: the row greys out with an Undo button and is dropped from storage immediately, so a page refresh finalizes the removal. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1
TODO.md
1
TODO.md
@@ -5,7 +5,6 @@
|
||||
|
||||
## Minor Gameplay Polish
|
||||
|
||||
- [ ] **Save active sessions in browser local storage**. Whenever you create or join a game, your browser local storage should be updated with the game ID, player ID, crew name, and player/rat names (if available). Going to the home page with saved sessions should provide a menu of games to rejoin in addition to the ability to start a new game. It should be possible to delete entries from this list, which only affects the browser local storage, not the backend database, and is undoable (the entry doesn't disappear immediately, it's just marked as deleted until page refresh).
|
||||
- [ ] **Dead Pi-Rat rank voting streamlined**. Don't allow voting for dead Pi-Rats. If a player's only vote options are dead, then they skip voting entirely.
|
||||
|
||||
## Words Words Words
|
||||
|
||||
Reference in New Issue
Block a user