Add crew/player/rat name to page title

Each routed page now sets a descriptive document.title so tabs and
browser history entries are distinguishable: the dashboard shows the
Pi-Rat (and human player) name plus crew, the admin panel shows
"Admin · {crew}", the join page is labeled, and home resets to the
app name. New lib/title.js helper composes "{parts} — Rats with Gats".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 21:09:36 -07:00
parent fb17c632b0
commit d68333ec05
6 changed files with 25 additions and 1 deletions

View File

@@ -1,7 +1,11 @@
<script>
import { onMount } from 'svelte';
import { push } from 'svelte-spa-router';
import { apiRequest } from '../lib/api';
import { setPageTitle } from '../lib/title';
export let params = {};
onMount(() => setPageTitle('Join the Crew'));
let gameId = params.id;
let playerName = '';
let error = '';