Session-close cosmetics:
1. Favicon — an 'S' monogram (indigo→violet rounded square, path-drawn so it's font-independent)
at public/favicon.svg, linked in index.html (tab had none before).
2. Dynamic document.title — reflects the current module ('Downloads · Siftlode'); Feed = brand
only; an open channel page shows the channel name. Shared pageTitleKey() in lib/pageMeta.ts
keeps the tab title and the top-bar header in lockstep.
3. The 'Siftlode' logo already navigated to Feed but read as static text — added a hover
background + cursor affordance so it's clearly clickable.
4. Module header — new shared PageTitle component (used by every non-feed module via Header) with
a tracked small-caps 'eyebrow' + leading accent dot (user-picked style B), styled in one place.
Verified in a real browser: favicon served (image/svg+xml), title updates per module, logo→feed,
header restyled; no console errors.
32 lines
967 B
TypeScript
32 lines
967 B
TypeScript
import type { Page } from "./urlState";
|
|
|
|
// The i18n key for a page's human title — shared by the top-bar header and the browser tab title
|
|
// so the two never drift. Keep in sync with the nav modules in NavSidebar / App's page switch.
|
|
export function pageTitleKey(page: Page): string {
|
|
switch (page) {
|
|
case "feed":
|
|
return "header.account.feed";
|
|
case "channels":
|
|
return "header.channelManager";
|
|
case "playlists":
|
|
return "header.account.playlists";
|
|
case "notifications":
|
|
return "inbox.navLabel";
|
|
case "messages":
|
|
return "messages.navLabel";
|
|
case "downloads":
|
|
return "downloads.navLabel";
|
|
case "stats":
|
|
return "header.usageStats";
|
|
case "scheduler":
|
|
return "header.scheduler";
|
|
case "config":
|
|
return "header.configuration";
|
|
case "users":
|
|
return "header.users";
|
|
case "settings":
|
|
return "settings.title";
|
|
default:
|
|
return "header.account.feed";
|
|
}
|
|
}
|