summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-26 21:22:59 +0100
committerTor Andersson <tor@ccxvii.net>2025-04-04 12:04:57 +0200
commit6138d98f4dd9b58febedb64f1a565b50c234f37f (patch)
treee3969d99194a7fa6bf2edd8d1df23ee9d2b7d584
parent4a89ecf40e5222f284fc19ba7c47ce4a28e47d97 (diff)
downloadserver-6138d98f4dd9b58febedb64f1a565b50c234f37f.tar.gz
Update rewind view for new game rules framework.
-rw-r--r--NOTES.md8
-rw-r--r--server.js2
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=?")