fix(frontend): enforce dark theme default and explicit daisyui config
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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"],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user