From d3b98053413c3da3032fd4d4ece53d9a01f64333 Mon Sep 17 00:00:00 2001 From: Till JS Date: Fri, 10 Apr 2026 17:37:42 +0200 Subject: [PATCH] feat(mana/web): play Who games inline on workbench page Embed PlayView directly in the ListView so games can be started and played without navigating away from the workbench. PlayView now accepts an onBack callback instead of hardcoded goto('/who'). Co-Authored-By: Claude Opus 4.6 (1M context) --- .../web/src/lib/modules/who/ListView.svelte | 198 +++++++++--------- .../src/lib/modules/who/views/PlayView.svelte | 5 +- .../(app)/who/play/[gameId]/+page.svelte | 3 +- 3 files changed, 107 insertions(+), 99 deletions(-) diff --git a/apps/mana/apps/web/src/lib/modules/who/ListView.svelte b/apps/mana/apps/web/src/lib/modules/who/ListView.svelte index b561c9e50..8784b5368 100644 --- a/apps/mana/apps/web/src/lib/modules/who/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/who/ListView.svelte @@ -2,23 +2,27 @@ Who — main module view. Shows the four decks at the top, the user's past games below. - Picking a deck calls whoGamesStore.start() and navigates to the - play view. Past games can be reopened (won/surrendered show the - full chat read-only) or deleted. + Picking a deck starts a game and shows PlayView inline. Past + games can be reopened (won/surrendered show the full chat + read-only) or deleted. --> -
- -
-

Who?

-

- Errate die historische Persönlichkeit. Eine KI verkörpert sie ohne den Namen zu verraten. -

-
+{#if activeGameId} + (activeGameId = null)} /> +{:else} +
+ +
+

Who?

+

+ Errate die historische Persönlichkeit. Eine KI verkörpert sie ohne den Namen zu verraten. +

+
- -
-

- Neues Spiel starten -

- {#if loadingDecks} -
- {#each Array(4) as _, i (i)} -
- {/each} -
- {:else if decks.length === 0} -

Keine Decks verfügbar.

- {:else} -
- {#each decks as deck (deck.id)} - - {/each} -
- {/if} -
- - - {#if games.length > 0} +

- Vergangene Spiele + Neues Spiel starten

-
    - {#each games as game (game.id)} -
  • - {statusEmoji(game.status)} + {#if loadingDecks} +
    + {#each Array(4) as _, i (i)} +
    + {/each} +
    + {:else if decks.length === 0} +

    Keine Decks verfügbar.

    + {:else} +
    + {#each decks as deck (deck.id)} - -
  • - {/each} -
+ {/each} +
+ {/if} - {/if} - {#if error} -
- {error} -
- {/if} -
+ + {#if games.length > 0} +
+

+ Vergangene Spiele +

+
    + {#each games as game (game.id)} +
  • + {statusEmoji(game.status)} + + +
  • + {/each} +
+
+ {/if} + + {#if error} +
+ {error} +
+ {/if} + +{/if} diff --git a/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte b/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte index b6cc1515f..906ebc2e6 100644 --- a/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte +++ b/apps/mana/apps/web/src/lib/modules/who/views/PlayView.svelte @@ -9,12 +9,11 @@ -->