ui/phase-26: history mode (turn navigator + read-only banner)
Split GameStateStore into currentTurn (server's latest) and viewedTurn (displayed snapshot) so history excursions don't corrupt the resume bookmark or the live-turn bound. Add viewTurn / returnToCurrent / historyMode rune, plus a game-history cache namespace that stores past-turn reports for fast re-entry. OrderDraftStore.bindClient takes a getHistoryMode getter and short-circuits add / remove / move while the user is viewing a past turn; RenderedReportSource skips the order overlay in the same case. Header replaces the static "turn N" with a clickable triplet (TurnNavigator), the layout mounts HistoryBanner under the header, and visibility-refresh is a no-op while history is active. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -89,7 +89,6 @@ const en = {
|
||||
"lobby.error.unknown": "{message}",
|
||||
|
||||
"game.shell.unknown": "?",
|
||||
"game.shell.headline": "{race} @ {game}, turn {turn}",
|
||||
"game.shell.connection.online": "online",
|
||||
"game.shell.connection.reconnecting": "reconnecting…",
|
||||
"game.shell.connection.offline": "offline",
|
||||
@@ -104,6 +103,15 @@ const en = {
|
||||
"game.shell.menu.language": "language",
|
||||
"game.shell.menu.logout": "logout",
|
||||
"game.shell.coming_soon": "coming soon",
|
||||
"game.shell.turn.label": "turn {turn}",
|
||||
"game.shell.turn.list_item": "turn #{turn}",
|
||||
"game.shell.turn.prev": "previous turn",
|
||||
"game.shell.turn.next": "next turn",
|
||||
"game.shell.turn.open_navigator": "open turn list",
|
||||
"game.shell.turn.close_navigator": "close turn list",
|
||||
"game.shell.history.viewing": "Viewing turn {turn} · read-only",
|
||||
"game.shell.history.return_to_current": "Return to current turn",
|
||||
"game.shell.history.current_badge": "current",
|
||||
"game.view.map": "map",
|
||||
"game.view.table": "table",
|
||||
"game.view.table.planets": "planets",
|
||||
|
||||
@@ -90,7 +90,6 @@ const ru: Record<keyof typeof en, string> = {
|
||||
"lobby.error.unknown": "{message}",
|
||||
|
||||
"game.shell.unknown": "?",
|
||||
"game.shell.headline": "{race} @ {game}, ход {turn}",
|
||||
"game.shell.connection.online": "онлайн",
|
||||
"game.shell.connection.reconnecting": "переподключение…",
|
||||
"game.shell.connection.offline": "офлайн",
|
||||
@@ -105,6 +104,15 @@ const ru: Record<keyof typeof en, string> = {
|
||||
"game.shell.menu.language": "язык",
|
||||
"game.shell.menu.logout": "выйти",
|
||||
"game.shell.coming_soon": "скоро будет",
|
||||
"game.shell.turn.label": "ход {turn}",
|
||||
"game.shell.turn.list_item": "ход #{turn}",
|
||||
"game.shell.turn.prev": "предыдущий ход",
|
||||
"game.shell.turn.next": "следующий ход",
|
||||
"game.shell.turn.open_navigator": "открыть список ходов",
|
||||
"game.shell.turn.close_navigator": "закрыть список ходов",
|
||||
"game.shell.history.viewing": "Просмотр хода {turn} · только чтение",
|
||||
"game.shell.history.return_to_current": "Вернуться к текущему ходу",
|
||||
"game.shell.history.current_badge": "текущий",
|
||||
"game.view.map": "карта",
|
||||
"game.view.table": "таблица",
|
||||
"game.view.table.planets": "планеты",
|
||||
|
||||
Reference in New Issue
Block a user