Use PLATFORM_NAME instead of hard-coding the app name

This commit is contained in:
Coracle-Bot 2026-09-09 21:40:45 +00:00 committed by hodlbod
parent e04516f4f0
commit b1117d601a
3 changed files with 5 additions and 7 deletions

View file

@ -126,6 +126,7 @@ callbacks and hot paths.
**CRITICAL Code Style Guidelines:**
- **No `null`** - only use `undefined`
- Never hard-code the app's name. The brand is a build-time `VITE_PLATFORM_*` variable, so user-facing copy interpolates `PLATFORM_NAME` from `@app/env`, and `PLATFORM_URL`, `PLATFORM_LOGO`, `PLATFORM_ABOUT` for the rest of it. Each is set by the deployment, so don't write a `"Flotilla"` fallback behind one either.
- Svelte 5 runes (`$state`, `$derived`, `$effect`) only in UI components
- TailwindCSS styling with css components customized by theme. See lib/components for examples.
- Comments, naming, conditionals and single-use indirection are covered by the Cleanup Pass above.

View file

@ -12,6 +12,7 @@
import {user} from "@app/core"
import {pushModal} from "@app/modal"
import {HostingError, listTenantRelays, type HostedRelay} from "@app/hosting"
import {PLATFORM_NAME} from "@app/env"
const {class: className = ""}: {class?: string} = $props()
@ -58,8 +59,8 @@
{#if relays.length > 0}
Spin up another hosted space — rooms, calendar and moderation included.
{:else}
Don't wait for an invite. Flotilla Hosting sets up a space with rooms, calendar and
moderation in about a minute.
Don't wait for an invite. {PLATFORM_NAME} Hosting sets up a space with rooms, calendar and moderation
in about a minute.
{/if}
</p>
<Button class="button button-primary button-sm" onclick={openCreate}>

View file

@ -7,8 +7,6 @@ import {app, profiles, rooms} from "@app/core"
import {PLATFORM_NAME} from "@app/env"
import {decodeRelay} from "@app/relays"
const FALLBACK_APP_NAME = "Flotilla"
const staticTitles = new Map<string, string>([
["/", "Redirecting"],
["/home", "Home"],
@ -108,9 +106,7 @@ export const makeTitle = (...parts: Array<string | undefined>) =>
parts
.map(part => part?.trim() || "")
.filter(identity)
.join(" · ") ||
PLATFORM_NAME ||
FALLBACK_APP_NAME
.join(" · ") || PLATFORM_NAME
export const getPageTitle = ({page, pubkey}: PageTitleContext) => {
const routeId = page.route.id || ""