feat(ui): establish shared desktop shell and assets

This commit is contained in:
sechmachine
2026-08-14 23:41:51 +07:00
parent 5967f7f70d
commit bac39812a3
15 changed files with 1822 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
(() => {
const systemIsDark = () => window.matchMedia('(prefers-color-scheme: dark)').matches;
let preference = 'system';
try {
preference = localStorage.getItem('labtimesheet-theme') || 'system';
} catch (_) {
// Browser privacy settings may disable storage; the system preference remains usable.
}
const dark = preference === 'dark' || (preference === 'system' && systemIsDark());
document.documentElement.dataset.theme = dark ? 'dark' : 'light';
document.documentElement.style.colorScheme = dark ? 'dark' : 'light';
})();