ui: add a 22px bottom footer (brand + version)
Footer is a third layout block; .layout height now subtracts --footer-h (22px) so it never overlaps the full-height video grid. Injected via JS only on pages with the main layout (skips login); shows CoRE.Vision brand + version. VERSION 0.0.135. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,16 @@ function ensureVersionEl() {
|
||||
aside.appendChild(d);
|
||||
}
|
||||
}
|
||||
function ensureFooter() {
|
||||
// футер 22px снизу — только на страницах с основной раскладкой (не на login)
|
||||
if (document.querySelector("footer.app-footer") || !document.querySelector(".layout")) return;
|
||||
const f = document.createElement("footer");
|
||||
f.className = "app-footer";
|
||||
f.innerHTML = `<span class="brand">CoRE<span>.Vision</span></span>` +
|
||||
`<span class="spacer"></span>` +
|
||||
`<span id="footer-version"></span>`;
|
||||
document.body.appendChild(f);
|
||||
}
|
||||
async function refreshStats() {
|
||||
const el = document.getElementById("sys-stats");
|
||||
try {
|
||||
@@ -148,6 +158,8 @@ async function refreshStats() {
|
||||
` Диск <b>${s.disk.used_gb}/${s.disk.total_gb} GB</b>`;
|
||||
const v = document.getElementById("app-version");
|
||||
if (v && s.version) v.textContent = "v" + s.version;
|
||||
const fv = document.getElementById("footer-version");
|
||||
if (fv && s.version) fv.textContent = "v" + s.version;
|
||||
} catch (e) { /* нет связи / 401 — молчим */ }
|
||||
}
|
||||
// ограничение подменю раскладок (режим 16+) — на любой странице с .subnav
|
||||
@@ -2037,6 +2049,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
startClock();
|
||||
bindLogout();
|
||||
ensureVersionEl();
|
||||
ensureFooter();
|
||||
refreshStats(); setInterval(refreshStats, 5000);
|
||||
applyGridMenuLimit();
|
||||
const page = document.body.dataset.page;
|
||||
|
||||
Reference in New Issue
Block a user