fix: eliminate white flash on page load for dark theme users (#7358)

Co-authored-by: Docker User <user@example.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
DeepReef11
2026-04-14 12:18:00 -04:00
committed by GitHub
parent af79a751fb
commit 54c62ec491

View File

@@ -50,6 +50,12 @@ export default defineNuxtConfig({
content: "Mealie is a recipe management app for your kitchen.",
},
],
script: [
{
innerHTML: `(function(){try{var d=localStorage.getItem('vueuse-color-scheme');var m=d==='dark'||(d!=='light'&&matchMedia('(prefers-color-scheme:dark)').matches);document.documentElement.style.backgroundColor=m?'#1E1E1E':'#FFFFFF'}catch(e){}})()`,
type: "text/javascript",
},
],
link: [
{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" },
{ rel: "shortcut icon", type: "image/png", href: "/icons/icon-x64.png" },