diff --git a/TODO.md b/TODO.md index 03766be..fa6b80d 100644 --- a/TODO.md +++ b/TODO.md @@ -45,7 +45,7 @@ - [ ] **Look for dead code.** While implementing the rollback feature, we discovered /scene/rollback, an unused and buggy single-card-play rollback route that was added but never hooked up to the UI. Look for other code that matches that pattern -- orphan functions and routes that never get called. -- [ ] **Scene dashboard design refresh.** There should be a column of bubbles/buttons to the left of the obstacle list panel. These represent the crew. You can click a Pi-Rat to pop out their character sheet. If the other player is a Pi-Rat in the scene, there's the "challenge them" UI, which no longer needs the "Challenge whom?" since it's tied to a particular character sheet. Finally, there's the personal objective list. There's also an objectives button (at the top level of the hierarchy) which shows a popup for crew objectives. This entirely replaces the character sheet panel on the current dashboard, as well as the roster at the top of the obstacle list. The captain has a steering wheel emoji next to them. The display should also show current hand size for all players. +- [x] **Scene dashboard design refresh.** There should be a column of bubbles/buttons to the left of the obstacle list panel. These represent the crew. You can click a Pi-Rat to pop out their character sheet. If the other player is a Pi-Rat in the scene, there's the "challenge them" UI, which no longer needs the "Challenge whom?" since it's tied to a particular character sheet. Finally, there's the personal objective list. There's also an objectives button (at the top level of the hierarchy) which shows a popup for crew objectives. This entirely replaces the character sheet panel on the current dashboard, as well as the roster at the top of the obstacle list. The captain has a steering wheel emoji next to them. The display should also show current hand size for all players. - [ ] Interaction during a challenge should be promoted to the top of the UI diff --git a/frontend/src/assets/css/components.css b/frontend/src/assets/css/components.css index 7455e4d..6c6cd0f 100644 --- a/frontend/src/assets/css/components.css +++ b/frontend/src/assets/css/components.css @@ -398,25 +398,6 @@ color: var(--ghost); } -.captain-badge { - background: color-mix(in srgb, var(--accent) 14%, transparent); - border: 1px solid var(--accent); - color: var(--accent); - padding: 0.4rem 1rem; - border-radius: 20px; - font-size: 1rem; - font-weight: 700; - font-family: var(--font-heading); - display: inline-flex; - align-items: center; - gap: 0.5rem; -} - -.captain-badge.vacant { - background: color-mix(in srgb, var(--text) 4%, transparent); - border: 1px dashed var(--edge); - color: var(--text-muted); -} /* --- Waiting indicator --- */ .waiting-box, .waiting-indicator { @@ -428,3 +409,56 @@ gap: 0.75rem; } +/* --- Modal overlay (shared by popups) --- */ +.modal-backdrop { + position: fixed; + inset: 0; + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; + padding: 20px; + background: color-mix(in srgb, var(--bg-deep) 70%, transparent); + backdrop-filter: blur(6px); +} + +.modal-box { + position: relative; + max-width: 440px; + width: 100%; + max-height: 88vh; + overflow-y: auto; + padding: 1.75rem; + border: 1px solid var(--edge); + border-radius: var(--radius-md); + box-shadow: var(--shadow-deep); +} + +.modal-box h3 { + margin-top: 0; +} + +.modal-box.sheet-modal { + max-width: 520px; + text-align: left; +} + +.modal-close { + position: absolute; + top: 0.6rem; + right: 0.75rem; + background: transparent; + border: none; + color: var(--text-muted); + font-size: 1.6rem; + line-height: 1; + cursor: pointer; + padding: 0.1rem 0.4rem; + border-radius: var(--radius-sm); +} + +.modal-close:hover { + color: var(--text); + background: color-mix(in srgb, var(--text) 10%, transparent); +} + diff --git a/frontend/src/assets/css/scene-play.css b/frontend/src/assets/css/scene-play.css index 56df859..0d76e1e 100644 --- a/frontend/src/assets/css/scene-play.css +++ b/frontend/src/assets/css/scene-play.css @@ -1,8 +1,9 @@ /* --- Scene board layout --- */ .scene-view-layout { display: grid; - grid-template-columns: 1.4fr 1fr; - gap: 2rem; + grid-template-columns: 180px 1.4fr 1fr; + gap: 1.5rem; + align-items: start; } @media (max-width: 1100px) { @@ -11,6 +12,98 @@ } } +/* --- Crew bubble column --- */ +.crew-column { + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.crew-objectives-btn { + width: 100%; + padding: 0.6rem 0.5rem; + background: color-mix(in srgb, var(--accent) 14%, transparent); + border: 1px solid var(--accent); + border-radius: var(--radius-md); + color: var(--text); + font-family: var(--font-heading); + font-size: 0.9rem; + cursor: pointer; + transition: var(--transition-smooth); +} + +.crew-objectives-btn:hover { + background: color-mix(in srgb, var(--accent) 24%, transparent); +} + +.crew-bubbles { + display: flex; + flex-direction: column; + gap: 0.6rem; +} + +.crew-bubble { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.1rem; + width: 100%; + text-align: left; + padding: 0.55rem 0.7rem; + background: var(--well); + border: 1px solid var(--edge); + border-left: 4px solid var(--pirat); + border-radius: var(--radius-md); + cursor: pointer; + transition: var(--transition-smooth); +} + +.crew-bubble:hover { + background: color-mix(in srgb, var(--text) 8%, transparent); + transform: translateX(2px); +} + +.crew-bubble.is-deep { + border-left-color: var(--deep); + background: color-mix(in srgb, var(--deep) 6%, transparent); +} + +.crew-bubble.is-you { + border-color: var(--accent); + border-left-color: var(--accent); +} + +.crew-bubble.is-ghost { opacity: 0.7; filter: grayscale(0.6); } +.crew-bubble.is-dead { opacity: 0.6; filter: grayscale(0.8); } + +.crew-bubble .bubble-icon { + font-size: 1.1rem; +} + +.crew-bubble .bubble-name { + font-weight: 700; + font-size: 0.9rem; + line-height: 1.15; + overflow-wrap: anywhere; +} + +.crew-bubble .bubble-meta { + font-size: 0.75rem; + color: var(--text-muted); +} + +/* On narrow screens the crew column becomes a horizontal strip above the board */ +@media (max-width: 1100px) { + .crew-bubbles { + flex-direction: row; + flex-wrap: wrap; + } + .crew-bubble { + width: auto; + flex: 1 1 140px; + } +} + .card-header { display: flex; justify-content: space-between; @@ -32,44 +125,6 @@ font-weight: 700; } -/* Scene status banner (captain + roster) */ -.scene-status-banner { - margin-bottom: 1.5rem; - padding: 1rem; - background: var(--well); - border: 1px solid var(--edge); - border-radius: var(--radius-md); - display: flex; - justify-content: space-between; - align-items: center; - flex-wrap: wrap; - gap: 1rem; -} - -.roster-chips { - display: flex; - gap: 0.5rem; - flex-wrap: wrap; - align-items: center; -} - -.roster-chips .roster-label { - font-size: 0.85rem; - color: var(--text-muted); - font-family: var(--font-heading); - margin-right: 0.25rem; -} - -.roster-chips .player-chip { - font-size: 0.8rem; - padding: 0.25rem 0.6rem; - border-radius: 12px; - margin: 0; - display: inline-flex; - align-items: center; - gap: 0.25rem; -} - /* --- Obstacles --- */ .obstacles-container { display: flex; diff --git a/frontend/src/components/ScenePhase.svelte b/frontend/src/components/ScenePhase.svelte index c370ea7..e44ff15 100644 --- a/frontend/src/components/ScenePhase.svelte +++ b/frontend/src/components/ScenePhase.svelte @@ -1,24 +1,22 @@
- Played by {state.player.player_name}{#if !state.player.completed_personal_2} โ they'll go by their smell until they earn a Name!{/if} -
- {/if} ++ Played by {target.player_name}{#if !target.completed_personal_2} โ they'll go by their smell until they earn a Name!{/if} +
{/if} - {#if state.player.needs_reroll} -You don't have a Pi-Rat in this scene. Sit back, enjoy the chaos, and you'll create your recruit with the crew between scenes.
-Your story arc is complete. You will choose to become a Ghost or roll a new character during the upkeep phase between scenes.
-You are in the Ghost World (grayscale view). You cannot interact well with the living but you can still help them resolve challenges!
-๐ซ You failed a refused Tax โ no more Gat/Name Taxes for you this scene.
-Look: {state.player.avatar_look}
-Smell: {state.player.avatar_smell}
-First Words: "{state.player.first_words}"
- {#if state.player.gat_description} -๐ซ Gat: {state.player.gat_description}
+You don't have a Pi-Rat in this scene. Sit back, enjoy the chaos, and you'll create your recruit with the crew between scenes.
+Your story arc is complete. You will choose to become a Ghost or roll a new character during the upkeep phase between scenes.
+You are in the Ghost World (grayscale view). You cannot interact well with the living but you can still help them resolve challenges!
+๐ซ You failed a refused Tax โ no more Gat/Name Taxes for you this scene.
+Look: {target.avatar_look}
+Smell: {target.avatar_smell}
+First Words: "{target.first_words}"
+ {#if target.gat_description} +๐ซ Gat: {target.gat_description}
+ {/if} +๐ Likes: "{target.other_like}" โ {getPlayerName(target.other_like_from_player_id)}
+ {/if} + {#if target.other_hate} +๐ Hates: "{target.other_hate}" โ {getPlayerName(target.other_hate_from_player_id)}
+ {/if} +Challenge them (e.g. for the Captaincy)! Your card becomes a temporary Obstacle they must beat. Both cards are discarded afterwards.
+ + {#if pvpCardObstacle} ++ As an Obstacle, {getCardDisplay(pvpCard)} is {pvpCardObstacle.title}: {pvpCardObstacle.description} +
+ {/if} + +๐ Likes: "{state.player.other_like}" โ {getPlayerName(state.player.other_like_from_player_id)}
- {/if} - {#if state.player.other_hate} -๐ Hates: "{state.player.other_hate}" โ {getPlayerName(state.player.other_hate_from_player_id)}
- {/if} -Challenge a crewmate (e.g. for the Captaincy)! Your card becomes a temporary Obstacle they must beat. Both cards are discarded afterwards.
- - - {#if pvpCardObstacle} -- As an Obstacle, {getCardDisplay(pvpCard)} is {pvpCardObstacle.title}: {pvpCardObstacle.description} -
- {/if} - -The whole crew works toward these. The Deep marks them off as you accomplish them.
+