From 5167d8f49e44be1e295edc3571509e6f207beb1a Mon Sep 17 00:00:00 2001 From: cucadmuh <49571317+cucadmuh@users.noreply.github.com> Date: Mon, 8 Jun 2026 12:59:07 +0300 Subject: [PATCH] feat(ui): themed startup splash with deferred window show (#1030) * feat(ui): add themed startup splash with deferred window show Show a theme-aware loading splash before the Vite bundle mounts, hide the native window until it paints, and use per-theme logo gradient colors. * docs: note startup splash in CHANGELOG and credits for PR #1030 * docs: attribute PR #1030 startup splash to cucadmuh --- CHANGELOG.md | 10 ++ index.html | 82 +++++++++ public/startup-splash-preflight.js | 161 ++++++++++++++++++ public/startup-splash-reveal.js | 28 +++ src-tauri/src/lib.rs | 22 +++ src-tauri/tauri.conf.json | 3 +- src/app/bootstrap.ts | 2 + src/app/startupSplash.test.ts | 53 ++++++ src/app/startupSplash.ts | 43 +++++ src/config/settingsCredits.ts | 1 + src/config/startupSplashPalettes.ts | 71 ++++++++ src/main.tsx | 3 + .../themes/startupThemeAppearance.test.ts | 89 ++++++++++ src/utils/themes/startupThemeAppearance.ts | 145 ++++++++++++++++ 14 files changed, 712 insertions(+), 1 deletion(-) create mode 100644 public/startup-splash-preflight.js create mode 100644 public/startup-splash-reveal.js create mode 100644 src/app/startupSplash.test.ts create mode 100644 src/app/startupSplash.ts create mode 100644 src/config/startupSplashPalettes.ts create mode 100644 src/utils/themes/startupThemeAppearance.test.ts create mode 100644 src/utils/themes/startupThemeAppearance.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d766f95..896c5ce4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +### Startup — themed loading splash before the app bundle loads + +**By [@cucadmuh](https://github.com/cucadmuh), PR [#1030](https://github.com/Psychotoxical/psysonic/pull/1030)** + +* Inline splash in `index.html` (progress bar + P logo) shows while the Vite bundle loads in dev and production — no empty or black window on launch. +* Splash colours follow the persisted theme (built-in palettes, day/night scheduler, and installed community themes); the logo uses each theme's accent gradient instead of a hardcoded white asset. +* The native window stays hidden until the splash has painted (`visible: false` + deferred `show` from Rust/JS); window-state restore no longer overrides startup visibility. + + + ## Changed ### Dependencies — npm and Rust refresh diff --git a/index.html b/index.html index 8e5a8e26..c476fc52 100644 --- a/index.html +++ b/index.html @@ -6,9 +6,91 @@