From 6138d98f4dd9b58febedb64f1a565b50c234f37f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 26 Mar 2025 21:22:59 +0100 Subject: Update rewind view for new game rules framework. --- NOTES.md | 8 ++++---- server.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NOTES.md b/NOTES.md index e5771ff..6f5eb27 100644 --- a/NOTES.md +++ b/NOTES.md @@ -40,18 +40,18 @@ * Screen size thresholds for layout triggers: - @media (max-width: 400) + @media (max-width: 400px) one-column tabbed mode - @media (max-width: 800) + @media (max-width: 800px) mobile phone layout two-column tabbed mode (notepad and chat window fill screen) horizontally scroll basic content; use full map width for hands etc - @media (max-height: 600) + @media (max-height: 600px) mobile phone landscape layout start hiding player names behind tap/hover hide or reduce turn info, role info, and current card - @media (max-height: 800) + @media (max-height: 800px) small laptop screen diff --git a/server.js b/server.js index 1e0ba1f..76df8b8 100644 --- a/server.js +++ b/server.js @@ -1409,7 +1409,7 @@ const SQL_FINISH_GAME = SQL(` const SQL_REWIND_GAME_CLOCK = SQL("update players set clock=1 where game_id=? and clock < 1") const SQL_REWIND_GAME = SQL("update games set status=1,result=null,moves=?,active=?,mtime=datetime() where game_id=?") -const SQL_SELECT_REWIND = SQL("select snap_id, state->>'$.active' as active, state->>'$.state' as state from game_snap where game_id=? order by snap_id desc") +const SQL_SELECT_REWIND = SQL("select snap_id, state->>'$.active' as active, coalesce(state->>'$.state', state->>'$.L.P', '-') as state from game_snap where game_id=? order by snap_id desc") const SQL_UPDATE_GAME_ACTIVE = SQL("update games set active=?,mtime=datetime(),moves=moves+1 where game_id=?") const SQL_UPDATE_GAME_SCENARIO = SQL("update games set scenario=? where game_id=?") -- cgit v1.2.3