mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 16:08:05 +00:00
The Settings window loads the same page as project windows, so it showed the launch splash with the logo. It now shows only the bar, after 400 ms. The bar's sliding animation was switched off under reduced motion, leaving a static 40% fill. It is now a fake progress that eases towards ~90% and fills to 100% before the splash fades out. Claude-Session: https://claude.ai/code/session_01B65qLEKnkeYTGdbwhLpjCu
16 lines
779 B
JavaScript
16 lines
779 B
JavaScript
/* global document, localStorage, window */
|
|
// Runs before the app's CSS loads: restores the last theme (theme.ts stores it)
|
|
// so a new window starts in it instead of flashing the light default.
|
|
// An external file because the CSP forbids inline scripts.
|
|
try {
|
|
const last = JSON.parse(localStorage.getItem("openidea.theme") ?? "null");
|
|
if (last?.theme) document.documentElement.dataset.theme = last.theme;
|
|
if (last?.contrast) document.documentElement.dataset.contrast = last.contrast;
|
|
} catch {
|
|
/* storage unavailable */
|
|
}
|
|
// Settings windows (`settings-<parent>`) load this page too: splash.css drops the logo for them.
|
|
if (window.__TAURI_INTERNALS__?.metadata?.currentWindow?.label?.startsWith("settings-")) {
|
|
document.documentElement.dataset.window = "settings";
|
|
}
|