diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-08 03:37:19 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-08 03:37:19 +0100 |
| commit | 7ebf8c7876b9540843d2635baf55ca4061267e40 (patch) | |
| tree | 3444f06cc3386285ae5d3b6e0f916b5ec7fd6f93 /web/play/src | |
| parent | crash: show and verify the revealed seed in the TUI and GUI (diff) | |
| download | zagan-bet-7ebf8c7876b9540843d2635baf55ca4061267e40.tar.gz zagan-bet-7ebf8c7876b9540843d2635baf55ca4061267e40.zip | |
web: show the account number and stop reel spin on an error
Also documents the __Host- cookie prefix used on HTTPS.
Diffstat (limited to 'web/play/src')
| -rw-r--r-- | web/play/src/main.ts | 2 | ||||
| -rw-r--r-- | web/play/src/slots.ts | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/web/play/src/main.ts b/web/play/src/main.ts index 2dd3ce9..15eecf5 100644 --- a/web/play/src/main.ts +++ b/web/play/src/main.ts | |||
| @@ -19,6 +19,7 @@ const gameBoard = byId("game-board"); | |||
| 19 | const gameSide = byId("game-side"); | 19 | const gameSide = byId("game-side"); |
| 20 | const gameTitle = byId("game-title"); | 20 | const gameTitle = byId("game-title"); |
| 21 | const gameBadge = byId("game-badge"); | 21 | const gameBadge = byId("game-badge"); |
| 22 | const lobbyAccount = byId("lobby-account"); | ||
| 22 | const historyBody = byId("history-body"); | 23 | const historyBody = byId("history-body"); |
| 23 | const authForm = byId<HTMLFormElement>("auth-form"); | 24 | const authForm = byId<HTMLFormElement>("auth-form"); |
| 24 | const authUser = byId<HTMLInputElement>("auth-user"); | 25 | const authUser = byId<HTMLInputElement>("auth-user"); |
| @@ -226,6 +227,7 @@ function badge(view: View): string { | |||
| 226 | } | 227 | } |
| 227 | 228 | ||
| 228 | function renderLobby(lobby: View): void { | 229 | function renderLobby(lobby: View): void { |
| 230 | lobbyAccount.textContent = lobby.account ? `Account ${lobby.account}` : ""; | ||
| 229 | gameGrid.replaceChildren(); | 231 | gameGrid.replaceChildren(); |
| 230 | const list: [string, string][] = lobby.games ?? []; | 232 | const list: [string, string][] = lobby.games ?? []; |
| 231 | for (const [id, name] of list) { | 233 | for (const [id, name] of list) { |
diff --git a/web/play/src/slots.ts b/web/play/src/slots.ts index 7c4677d..8b821cf 100644 --- a/web/play/src/slots.ts +++ b/web/play/src/slots.ts | |||
| @@ -39,6 +39,7 @@ export function renderSlots( | |||
| 39 | ): void { | 39 | ): void { |
| 40 | latest = view; | 40 | latest = view; |
| 41 | latestBoard = board; | 41 | latestBoard = board; |
| 42 | if (view.error) spinUntil = 0; | ||
| 42 | if (animation !== undefined) { | 43 | if (animation !== undefined) { |
| 43 | window.clearInterval(animation); | 44 | window.clearInterval(animation); |
| 44 | animation = undefined; | 45 | animation = undefined; |
