diff options
Diffstat (limited to '')
| -rw-r--r-- | web/play/src/main.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/play/src/main.ts b/web/play/src/main.ts index fd55250..f051429 100644 --- a/web/play/src/main.ts +++ b/web/play/src/main.ts | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import { byId, money, node, sha256Hex, toast, toneFor } from "./dom"; | 1 | import { byId, money, node, sha256Hex, toast, toneFor } from "./dom"; |
| 2 | import { Gateway } from "./net"; | 2 | import { Gateway } from "./net"; |
| 3 | import { renderBlackjack } from "./blackjack"; | 3 | import { renderBlackjack } from "./blackjack"; |
| 4 | import { renderCrash } from "./crash"; | 4 | import { renderCrash, stopCrashAnimation } from "./crash"; |
| 5 | import { renderHistory } from "./history"; | 5 | import { renderHistory } from "./history"; |
| 6 | import { renderRoulette } from "./roulette"; | 6 | import { renderRoulette } from "./roulette"; |
| 7 | import { renderSlots } from "./slots"; | 7 | import { renderSlots, stopSlotsAnimation } from "./slots"; |
| 8 | import type { View } from "./types"; | 8 | import type { View } from "./types"; |
| 9 | 9 | ||
| 10 | const authScreen = byId("auth-screen"); | 10 | const authScreen = byId("auth-screen"); |
| @@ -72,6 +72,8 @@ const gateway = new Gateway(wsUrl, { | |||
| 72 | }, | 72 | }, |
| 73 | onView(next) { | 73 | onView(next) { |
| 74 | view = next; | 74 | view = next; |
| 75 | if (next.screen !== "slots") stopSlotsAnimation(); | ||
| 76 | if (next.screen !== "crash") stopCrashAnimation(); | ||
| 75 | // Game and history views carry no account field; the lobby is the source | 77 | // Game and history views carry no account field; the lobby is the source |
| 76 | // of truth for who is signed in. A null lobby user is a logout or an | 78 | // of truth for who is signed in. A null lobby user is a logout or an |
| 77 | // expired session. | 79 | // expired session. |
