fix: prevent library flash on reload
CI / test (push) Successful in 37s

Apply the requested view before first paint via a data-view attribute and CSS, and switch views before loading the library.
This commit is contained in:
strsv committed 2026-11-07 02:35:34 +03:00
1 parent b45b4437b8
commit eb8a9bb57b
4 files changed
+34 -1

No files matched your search

+4
View File
@@ -14,6 +14,10 @@
<script>
try {
if (localStorage.getItem("sb.theme") === "light") document.documentElement.dataset.theme = "light";
const view = new URLSearchParams(location.search).get("view");
if (["recommend", "hltb", "friends", "services"].includes(view)) {
document.documentElement.dataset.view = view;
}
} catch (_) {}
</script>
<link rel="stylesheet" href="/static/styles.css">