Move appearance into compact account theme controls

This commit is contained in:
SantaSpeen committed 2026-12-01 16:21:17 +03:00
1 parent 5852bf1897
commit c3257a0f4d
13 files changed
+136 -12

No files matched your search

+9
View File
@@ -19,6 +19,7 @@ const abort = new AbortController(),
{ signal } = abort;
const notify = createNotifier($("#project-toast"), { t });
const cleanups = [];
let syncAccountTheme = () => {};
const pageIds = new Set(["overview", "projects", "logs"]);
let allowedIds = new Set(),
serviceHome = null;
@@ -45,6 +46,7 @@ const preview = (id) =>
: /^error-(\d{3}|offline|banned)$/.exec(id || "")?.[1];
const fixed = (id) => fixedIds.has(id) || Boolean(preview(id));
function renderTheme() {
syncAccountTheme();
applyTheme({ theme });
$("#theme-toggle").innerHTML = iconSvg(theme === "light" ? "moon" : "sun", {
size: 20,
@@ -388,7 +390,14 @@ const dock = mountDock({
const accountMenu = mountAccountMenu($("#persistent-account"), {
t,
onNavigate: go,
theme,
onThemeChange: (mode) => {
theme = mode;
renderTheme();
if (current === "account-settings") showPage(current);
},
});
syncAccountTheme = () => accountMenu.setTheme(theme);
const navigation = mountNavigation($(".nav-links"), {
t,
onActiveChange: (id) => {