diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-25 18:12:37 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-25 18:12:37 -0700 |
commit | ea49bdfd2c83a0fced5a43015f5c1ce4f5dbce65 (patch) | |
tree | bfadc5d352adb0d4c7926c22826f67268b6145f0 /web/static | |
parent | 69325ef5bbd7f34e894222b9c416c94f4236ac2c (diff) | |
download | dartboat-ea49bdfd2c83a0fced5a43015f5c1ce4f5dbce65.tar.gz dartboat-ea49bdfd2c83a0fced5a43015f5c1ce4f5dbce65.tar.xz |
web: use a common function to determine the next action
Diffstat (limited to 'web/static')
-rw-r--r-- | web/static/dartboat.js | 8 | ||||
-rw-r--r-- | web/static/index.html | 2 | ||||
-rw-r--r-- | web/static/style.css | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js index cb84fe3..cb8e9dd 100644 --- a/web/static/dartboat.js +++ b/web/static/dartboat.js @@ -113,19 +113,19 @@ prompt_handlers.num_darts = { } }; -prompt_handlers.match_over = { +prompt_handlers.end_match = { __proto__: prompt_handlers.default_with_undo, append() {}, submit() { - Module.ccall('prompt_match_mode'); + Module.ccall('end_match'); } }; -prompt_handlers.init = { +prompt_handlers.match_mode = { __proto__: prompt_handlers.default, - _keypad: 'init', + _keypad: 'match_mode', submit() { let v = this._get_and_clear(); diff --git a/web/static/index.html b/web/static/index.html index 5fb11a8..e1384bb 100644 --- a/web/static/index.html +++ b/web/static/index.html @@ -47,7 +47,7 @@ <div onclick="promptHandle('undo')" class="key" id="key_undo">UNDO</div> <div onclick="promptHandle('submit_rem')" class="key">REMAINING</div> </div> - <div id="keypad-init" class="keypad"> + <div id="keypad-match_mode" class="keypad"> <div onclick="promptHandle('append', 1); promptHandle('submit')" class="key"><span class="keyboard-val">[1]</span> Play against bot</div> <div onclick="promptHandle('append', 2); promptHandle('submit')" class="key"><span class="keyboard-val">[2]</span> One-player scoreboard</div> <div onclick="promptHandle('append', 3); promptHandle('submit')" class="key"><span class="keyboard-val">[3]</span> Two-player scoreboard</div> diff --git a/web/static/style.css b/web/static/style.css index 2a3d60b..519a437 100644 --- a/web/static/style.css +++ b/web/static/style.css @@ -42,7 +42,7 @@ div#controls .keypad { display: contents; } -div#controls #keypad-init .key { +div#controls #keypad-match_mode .key { grid-column: 1 / -1; padding-left: 0.4rem; |