summaryrefslogtreecommitdiff
path: root/usr/share
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2020-03-30 00:12:13 +0200
committerOlivier Gayot <olivier.gayot@sigexec.com>2020-03-30 00:12:13 +0200
commitae0c2e6e17b64781d26ffe2b2592c4e9675e9130 (patch)
treeb471117b508aba09ac2f4f263790245b6bfcc358 /usr/share
parentfdc092990d5e3b9a28e7b646047a877e2cd88dcc (diff)
Quick and dirty impl. to get the black card visible after collectionblack_card_visible
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'usr/share')
-rw-r--r--usr/share/swiftstory/www/swiftstory-mobile.html6
-rw-r--r--usr/share/swiftstory/www/swiftstory-mobile.js4
2 files changed, 7 insertions, 3 deletions
diff --git a/usr/share/swiftstory/www/swiftstory-mobile.html b/usr/share/swiftstory/www/swiftstory-mobile.html
index a0407d4..ed5c849 100644
--- a/usr/share/swiftstory/www/swiftstory-mobile.html
+++ b/usr/share/swiftstory/www/swiftstory-mobile.html
@@ -23,10 +23,10 @@
<button id="join-btn" class="bottom" hidden>Join game!</button>
</div>
<div id="game" class="page">
+ <div class="card-list read-only">
+ <button id="black-card" class="card black"></button>
+ </div>
<div data-state="judge-collect">
- <div class="card-list read-only">
- <button id="black-card" class="card black"></button>
- </div>
<div class="message">You have <span id="played-card-number">0</span> cards!</div>
</div>
<div id="white-cards" class="card-list read-only" disabled='disabled'></div>
diff --git a/usr/share/swiftstory/www/swiftstory-mobile.js b/usr/share/swiftstory/www/swiftstory-mobile.js
index b05193c..65abc54 100644
--- a/usr/share/swiftstory/www/swiftstory-mobile.js
+++ b/usr/share/swiftstory/www/swiftstory-mobile.js
@@ -43,10 +43,12 @@ $(document).ready(function() {
$home.removeClass("current");
$game.addClass("current");
$all.hide();
+ $black_card.hide();
};
swst.on_change_state = function(state) {
$all.hide();
+ $black_card.hide();
switch (state) {
case 'waiting_judge':
@@ -57,6 +59,7 @@ $(document).ready(function() {
case 'waiting_designation':
if (swst.is_judge()) {
$judge_choose.show();
+ $black_card.show();
$played_cards.removeAttr('disabled');
$played_cards.removeClass('read-only');
} else {
@@ -68,6 +71,7 @@ $(document).ready(function() {
case 'waiting_collection':
if (swst.is_judge()) {
$judge_collect.show();
+ $black_card.show();
$white_cards.attr('disabled', true);
$white_cards.addClass('read-only');
} else {