The headless screenshots from Phases 4 and 5 had VITE_LUMOTIA_QUIETWARE=1 set at capture time; the running Tauri dev/release builds did not. Result: 21 commits of design work were invisible in the actual app even though the emailed screenshots showed v0.3. Fix is one-line: invert the env-var check in src/routes/+layout.svelte so data-design="quietware" is the default on this branch. Explicit opt-out via VITE_LUMOTIA_QUIETWARE=0 still works for anyone who wants to see the v0.2 surface for comparison. Behaviour: unset → quietware ON "1" → quietware ON (same as unset) "0" → v0.2 surface forced Branch-only default for now. Merge to main can decide whether to keep this or require explicit opt-in once v0.3 stabilises.
60 lines
2.1 KiB
Svelte
60 lines
2.1 KiB
Svelte
<script lang="ts">
|
|
// @ts-nocheck
|
|
// v0.2 Phase 6 — thin composition. The three split-out shells own
|
|
// their respective responsibilities; this file just decides whether
|
|
// to render the chrome (main window) or pass children straight
|
|
// through (secondary windows like /float, /viewer, /preview, which
|
|
// also have their own +layout@.svelte to break out of this layout).
|
|
import "../app.css";
|
|
import { page as sveltePage } from "$app/stores";
|
|
import AppRuntime from "$lib/shell/AppRuntime.svelte";
|
|
import AppChrome from "$lib/shell/AppChrome.svelte";
|
|
import AppOverlays from "$lib/shell/AppOverlays.svelte";
|
|
|
|
let { children } = $props();
|
|
|
|
// Defensive: secondary windows use +layout@.svelte to escape this
|
|
// root layout, but if any /float, /viewer, /preview load ever
|
|
// reaches here we still drop the chrome.
|
|
let isSecondaryWindow = $derived(
|
|
$sveltePage.url.pathname.startsWith("/float") ||
|
|
$sveltePage.url.pathname.startsWith("/viewer") ||
|
|
$sveltePage.url.pathname.startsWith("/preview")
|
|
);
|
|
|
|
// v0.3 Tactile Quietware activation.
|
|
//
|
|
// Phase 5g (round-15): quietware is now ON by default on the
|
|
// feat/v0.3-tactile-quietware branch so every normal Tauri build
|
|
// shows the new design without needing the VITE_LUMOTIA_QUIETWARE
|
|
// env var. The v0.2 fallback is still reachable by explicitly
|
|
// clearing the attribute via dev tools, or by setting
|
|
// VITE_LUMOTIA_QUIETWARE=0 at build time to force the off state.
|
|
//
|
|
// Combine with data-theme="light" and data-contrast="high" (wired
|
|
// elsewhere) for the light and high-contrast modes.
|
|
$effect(() => {
|
|
if (typeof document === "undefined") return;
|
|
if (import.meta.env.VITE_LUMOTIA_QUIETWARE === "0") {
|
|
// Explicit opt-out → restore v0.2 surface.
|
|
if (document.documentElement.dataset.design === "quietware") {
|
|
delete document.documentElement.dataset.design;
|
|
}
|
|
} else {
|
|
document.documentElement.dataset.design = "quietware";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<AppRuntime />
|
|
|
|
{#if isSecondaryWindow}
|
|
{@render children()}
|
|
{:else}
|
|
<AppChrome>
|
|
{@render children()}
|
|
</AppChrome>
|
|
{/if}
|
|
|
|
<AppOverlays />
|