diff --git a/src/App.svelte b/src/App.svelte index ee8f501..f43914c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -4,6 +4,7 @@ import { listen } from "@tauri-apps/api/event"; import { getVersion } from "@tauri-apps/api/app"; import { getCurrentWindow } from "@tauri-apps/api/window"; + import { platform } from "@tauri-apps/plugin-os"; import { gql } from "./lib/client"; import logoUrl from "./assets/moku-icon-splash.svg"; import { probeServer, loginBasic, authSession, logout } from "./lib/auth"; @@ -69,7 +70,8 @@ } const MAX_ATTEMPTS = 10; - const win = getCurrentWindow(); + const win = getCurrentWindow(); + const isWindows = platform() === "windows"; let serverProbeOk = $state(false); let appReady = $state(false); @@ -433,6 +435,22 @@ onDismiss={() => { idle = false; resetIdle(); }} /> {/if} {#if !store.activeChapter}{/if} + {#if store.activeChapter && isWindows && !store.isFullscreen} +
+ + + +
+ {/if}
{#if store.activeChapter}{:else}{/if}
@@ -452,6 +470,36 @@ .root { display: flex; flex-direction: column; height: 100%; overflow: hidden; } .content { flex: 1; overflow: hidden; } + .reader-chrome { + position: fixed; + top: 0; + right: 0; + z-index: calc(var(--z-reader) + 1); + display: flex; + align-items: center; + gap: 2px; + padding: 6px 4px; + opacity: 0; + transition: opacity 0.2s ease; + -webkit-app-region: no-drag; + } + .reader-chrome:hover { opacity: 1; } + .reader-chrome button { + display: flex; + align-items: center; + justify-content: center; + width: 28px; + height: 28px; + border-radius: var(--radius-sm); + color: var(--text-faint); + background: none; + border: none; + cursor: pointer; + transition: color var(--t-base), background var(--t-base); + } + .reader-chrome button:hover { color: var(--text-muted); background: rgba(255,255,255,0.08); } + .reader-chrome .chrome-close:hover { color: #fff; background: #c0392b; } + /* Auth overlay — floats above the SplashScreen */ .auth-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; pointer-events: none; } .auth-card { pointer-events: auto; width: min(280px, calc(100vw - 48px)); background: var(--bg-surface); border: 1px solid var(--border-base); border-radius: var(--radius-xl); padding: var(--sp-6) var(--sp-5); display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); box-shadow: 0 32px 80px rgba(0,0,0,0.75); animation: authIn 0.28s cubic-bezier(0.16,1,0.3,1) both; text-align: center; }