diff --git a/ui/src/app/core/platform.ts b/ui/src/app/core/platform.ts index 3a094ef..c648279 100644 --- a/ui/src/app/core/platform.ts +++ b/ui/src/app/core/platform.ts @@ -8,6 +8,9 @@ declare global { __APP_PLATFORM?: string; /** Which root component this window boots. */ __APP_MODE?: 'main' | 'editor' | 'manager'; + /** Which skin tree this window boots. Baked into the preload because + * settings resolve too late to decide layout without a flash. */ + __APP_SKIN?: 'modern' | 'win7'; /** Window-kind specific context (EditorOpenContext for editor windows). */ __APP_CTX?: unknown; } @@ -32,6 +35,26 @@ export const APP_MODE: 'main' | 'editor' | 'manager' = export const EDITOR_CONTEXT = typeof window !== 'undefined' ? (window.__APP_CTX as EditorOpenContext | undefined) : undefined; +/** + * Which skin tree this window booted. Read from the preload rather than from + * SettingsService because both are needed before first paint — main.ts picks a + * root component from it, and it must not change under a running window (the + * native frame is fixed at BrowserWindow construction). + */ +export const APP_SKIN: 'modern' | 'win7' = + typeof window !== 'undefined' ? (window.__APP_SKIN ?? 'modern') : 'modern'; + +export const IS_WIN7_CHROME = APP_SKIN === 'win7'; + +/** + * True when macOS traffic lights overlay the app's own header row — the fused + * `hiddenInset` layout, which reserves `pl-24` for them. False under the win7 + * skin even on macOS: `titleBarStyle: 'hidden'` removes the traffic lights + * altogether, so reserving space would leave a gap. Only the shadlike tree + * reads this; 7like draws its own title bar and never defers to native chrome. + */ +export const IS_MAC_CHROME = IS_MAC && !IS_WIN7_CHROME; + /** * Kill the webview's default right-click menu (Reload, Inspect Element…) * everywhere the app doesn't show its own native menu. Text fields keep the diff --git a/ui/src/app/skins/shadlike/app.html b/ui/src/app/skins/shadlike/app.html new file mode 100644 index 0000000..c8e8f62 --- /dev/null +++ b/ui/src/app/skins/shadlike/app.html @@ -0,0 +1,58 @@ +
{{ i18n.t('app.notConnectedTitle') }}
++ {{ i18n.t('app.notConnectedBody') }} +
+{{ i18n.t('app.managerOpen') }}
+ ++ {{ i18n.t('connMgr.noneTitle') }} +
++ {{ i18n.t('connMgr.noneBody') }} +
+ } ++ {{ i18n.t('connMgr.selectPrompt') }} +
+{{ targetLabel() }}
+ +| + | {{ i18n.t('dialogs.read') }} | +{{ i18n.t('dialogs.write') }} | +{{ i18n.t('dialogs.execute') }} | +
|---|---|---|---|
| {{ i18n.t('dialogs.' + role) }} | + @for (perm of perms; track perm; let p = $index) { ++ + | + } +
{{ request().body }}
++ @if (isDir()) { + {{ i18n.t('dialogs.overwriteDirBody') }} + } @else { + {{ i18n.t('dialogs.overwriteFileBody') }} + } +
+ + +{{ i18n.t('editor.noFileTitle') }}
++ {{ i18n.t('editor.noFileBody') }} +
+{{ i18n.t('editor.cantOpen', { name: ctx.name }) }}
+{{ error }}
+ ++ {{ i18n.t('editor.saveChangesBody') }} +
+