fix: popout theme inheritance via URL query param
CI / lint (push) Successful in 24s
CI / security (push) Successful in 14s
CI / test (push) Successful in 28s
CI / build (push) Successful in 18s
CI / e2e (push) Failing after 10s

- Pass current theme as ?theme=dark|light in popout URL
- viewer.js, app.js, palette.js all pass theme to popout
- popout.html reads theme from URL param first (fallback: localStorage, then dark)
- Also syncs theme back to localStorage when set via query param
This commit is contained in:
2026-07-24 14:56:29 -04:00
parent f3bfd01f93
commit a1355977d9
4 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -3308,7 +3308,8 @@
const openNewWindowBtn = el("button", { class: "btn-action", title: "Ouvrir dans une nouvelle fenetre" }, [icon("external-link", 14), document.createTextNode("pop-out")]);
openNewWindowBtn.addEventListener("click", () => {
const popoutUrl = `/popout/${encodeURIComponent(data.vault)}/${encodeURIComponent(data.path)}`;
const theme = document.documentElement.getAttribute('data-theme') || 'dark';
const popoutUrl = `/popout/${encodeURIComponent(data.vault)}/${encodeURIComponent(data.path)}?theme=${theme}`;
window.open(popoutUrl, `popout_${data.vault}_${data.path.replace(/[^a-zA-Z0-9]/g, "_")}`, "width=1000,height=700,menubar=no,toolbar=no,location=no,status=no,resizable=yes,scrollbars=no");
});