fix(frontend): enforce dark theme default and explicit daisyui config

This commit is contained in:
spinline
2026-01-31 19:45:42 +03:00
parent e784a2dd42
commit 591d09c36d
2 changed files with 11 additions and 3 deletions

View File

@@ -20,12 +20,16 @@
<link data-trunk rel="copy-file" href="icon-192.png" /> <link data-trunk rel="copy-file" href="icon-192.png" />
<script> <script>
(function () { (function () {
var t = localStorage.getItem("vibetorrent_theme") || "dark"; var localTheme = localStorage.getItem("vibetorrent_theme");
var t = localTheme || "dark";
if (t === "Amoled") t = "black"; if (t === "Amoled") t = "black";
if (t === "Light") t = "light"; if (t === "Light") t = "light";
if (t === "Dark" || t === "Midnight") t = "dark"; if (t === "Dark" || t === "Midnight") t = "dark";
document.documentElement.setAttribute("data-theme", t.toLowerCase()); document.documentElement.setAttribute("data-theme", t.toLowerCase());
if (!localTheme) {
localStorage.setItem("vibetorrent_theme", "Dark");
}
})(); })();
</script> </script>
</head> </head>

View File

@@ -12,6 +12,10 @@ module.exports = {
} }
}, },
}, },
plugins: [], plugins: [
require('daisyui'),
],
daisyui: {
themes: ["dark", "light", "cupcake", "bumblebee", "emerald", "corporate", "synthwave", "retro", "cyberpunk", "valentine", "halloween", "garden", "forest", "aqua", "lofi", "pastel", "fantasy", "wireframe", "black", "luxury", "dracula", "cmyk", "autumn", "business", "acid", "lemonade", "night", "coffee", "winter"],
},
} }