diff --git a/src/apps/dashboard/views.py b/src/apps/dashboard/views.py index c7d766f..b449f9e 100644 --- a/src/apps/dashboard/views.py +++ b/src/apps/dashboard/views.py @@ -181,6 +181,7 @@ def kit_bag(request): ) tithe_tokens = [t for t in tokens if t.token_type == Token.TITHE] return render(request, "core/_partials/_kit_bag_panel.html", { + "equipped_deck": request.user.equipped_deck, "equipped_trinket": request.user.equipped_trinket, "free_token": free_tokens[0] if free_tokens else None, "free_count": len(free_tokens), diff --git a/src/functional_tests/test_game_kit.py b/src/functional_tests/test_game_kit.py index adf3297..488d2e0 100644 --- a/src/functional_tests/test_game_kit.py +++ b/src/functional_tests/test_game_kit.py @@ -62,3 +62,24 @@ class GameKitTest(FunctionalTest): lambda: self.browser.find_element(By.ID, "id_kit_btn") ) self.assertTrue(kit_btn.is_displayed()) + + def test_kit_dialog_shows_equipped_deck(self): + """New user auto-gets Earthman equipped; kit bar shows its deck card.""" + self.browser.get(self.gate_url) + self.browser.find_element(By.ID, "id_kit_btn").click() + self.wait_for( + lambda: self.browser.find_element( + By.CSS_SELECTOR, + f"#id_kit_bag_dialog .kit-bag-deck[data-deck-id='{self.gamer.equipped_deck.pk}']", + ) + ) + + def test_kit_dialog_always_shows_dice_placeholder(self): + self.browser.get(self.gate_url) + self.browser.find_element(By.ID, "id_kit_btn").click() + self.wait_for( + lambda: self.browser.find_element( + By.CSS_SELECTOR, + "#id_kit_bag_dialog .kit-bag-placeholder", + ) + ) diff --git a/src/static_src/scss/_game-kit.scss b/src/static_src/scss/_game-kit.scss index c353191..01ffd38 100644 --- a/src/static_src/scss/_game-kit.scss +++ b/src/static_src/scss/_game-kit.scss @@ -102,13 +102,36 @@ padding: 0 0.125rem; &:hover .token-tooltip { display: none; } // JS positions these as fixed - - } .token-tooltip { z-index: 9999; } + + .kit-bag-deck { + font-size: 1.5rem; + cursor: pointer; + padding: 0 0.125rem; + } + + .kit-bag-placeholder { + font-size: 1.5rem; + opacity: 0.3; + padding: 0 0.125rem; + } +} + +.kit-bag-section--tokens { + flex: 1; + min-width: 0; + overflow: hidden; +} + +.kit-bag-row--scroll { + overflow-x: auto; + flex-wrap: nowrap; + scrollbar-width: none; + &::-webkit-scrollbar { display: none; } } .kit-bag-empty { diff --git a/src/templates/core/_partials/_kit_bag_panel.html b/src/templates/core/_partials/_kit_bag_panel.html index 104a0f0..422d83d 100644 --- a/src/templates/core/_partials/_kit_bag_panel.html +++ b/src/templates/core/_partials/_kit_bag_panel.html @@ -1,8 +1,27 @@ -{% if equipped_trinket or free_token or tithe_token %} +{% if equipped_deck %}
Kit bag empty.
{% endif %}