diff --git a/packages/web/public/family.json b/packages/web/public/family.json index f9e6d33..48572da 100644 --- a/packages/web/public/family.json +++ b/packages/web/public/family.json @@ -1,5 +1,6 @@ { "family": "Kestrel's Hall", + "hall": "https://gamehall.kestrelsnest.social", "games": [ { "slug": "wizwar", diff --git a/packages/web/src/App.svelte b/packages/web/src/App.svelte index 985ee0f..9f5e661 100644 --- a/packages/web/src/App.svelte +++ b/packages/web/src/App.svelte @@ -10,7 +10,7 @@ import Card from "./Card.svelte"; import Help from "./Help.svelte"; import { HELP_TABS, type HelpTab } from "./help-state"; - import { otherGames, type FamilyGame } from "./family"; + import { loadFamily, type FamilyGame } from "./family"; import { summarizeMissed } from "./catchup"; import Replay from "./Replay.svelte"; import FxGallery from "./FxGallery.svelte"; @@ -29,8 +29,12 @@ let name = $state(prefs.wizardName); /** The other games of Kestrel's Hall, for the front page. */ let family = $state([]); + let hall = $state(""); $effect(() => { - void otherGames("wizwar").then((g) => (family = g)); + void loadFamily("wizwar").then((f) => { + family = f.games; + hall = f.hall; + }); }); let joinCode = $state(""); let claimPhrase = $state(""); @@ -2568,7 +2572,7 @@ watch clips from the labyrinth {#if family.length} -

Also in Kestrel's Hall: +

Also in {#if hall}Kestrel's Hall{:else}Kestrel's Hall{/if}: {#each family as g, i (g.slug)}{i > 0 ? ", " : " "}{g.name}{/each}

{/if} diff --git a/packages/web/src/Help.svelte b/packages/web/src/Help.svelte index e5915b1..6ce5a56 100644 --- a/packages/web/src/Help.svelte +++ b/packages/web/src/Help.svelte @@ -3,7 +3,7 @@ // body, the card library with proper entries, the house rulings, the // story of the table, and the tally. Every section and card has a link // a player can send; the desk remembers where the reader was. - import { otherGames, type FamilyGame } from "./family"; + import { loadFamily, type FamilyGame } from "./family"; import { cardDef } from "@wizwar/engine"; import { tick } from "svelte"; import Card from "./Card.svelte"; @@ -130,8 +130,12 @@ }); /** The other games of Kestrel's Hall, for the about page. */ let family = $state([]); + let hall = $state(""); $effect(() => { - void otherGames("wizwar").then((g) => (family = g)); + void loadFamily("wizwar").then((f) => { + family = f.games; + hall = f.hall; + }); }); @@ -318,7 +322,7 @@ kestrelsnest.social.

{#if family.length} -

More games in Kestrel's Hall

+

More games in {#if hall}Kestrel's Hall{:else}Kestrel's Hall{/if}