This commit is contained in:
Mateusz Gruszczyński committed 2026-11-14 17:24:12 +01:00
1 parent 78dbb31487
commit f48843e934
83 files changed
+7304 -1203

No files matched your search

+3 -1
View File
@@ -165,7 +165,7 @@ function setPanel(name, navigate = true) {
for (const id of ["overview-layout-open", "overview-layout-unlock"]) if ($(id)) $(id).hidden = name !== "overview" || (id === "overview-layout-unlock" && !!window.rustProxyInlineLayout?.isEditing?.());
document.querySelectorAll(".nav").forEach(e => e.classList.toggle("active", e.dataset.panel === name));
document.querySelectorAll(".panel").forEach(e => e.hidden = e.id !== `panel-${name}`);
$("page-label").textContent = t(name); $("page-title").textContent = t(`${name}Title`); $("page-description").textContent = t(`${name}Description`);
$("page-label").textContent = t(name); $("page-title").textContent = t(`${name}Title`); const descriptionKey = `${name}Description`, description = t(descriptionKey); $("page-description").textContent = description === descriptionKey ? "" : description; $("page-description").hidden = description === descriptionKey;
if (navigate && typeof location !== "undefined" && ["http:", "https:"].includes(location.protocol) && location.pathname !== PANEL_PATHS[name]) history.pushState({ panel: name }, "", PANEL_PATHS[name]);
if (name === "web-server" && latestStatus) window.rustProxyWebServer?.renderLive?.(latestStatus, false);
if (name === "settings") window.rustProxySettings?.syncLocation?.();
@@ -542,6 +542,8 @@ async function activate(info) {
void window.rustProxyApiTokens?.refresh?.();
window.rustProxySettings?.scrollToApiTokens?.();
}
if (window.rustProxySettings?.current?.() === "prometheus") void window.rustProxyPrometheusToken?.refresh?.();
if (window.rustProxySettings?.current?.() === "certificate-api") void window.rustProxyCertificateApi?.load?.();
void refresh(true).catch(error => {
if (authenticated && epoch === authEpoch && error?.status !== 401) toast(error.message, true);
});