revert: restore all files to 52ddee3 — kiosk JS patches broke JARVIS completely

This commit is contained in:
2026-06-21 05:10:30 +00:00
parent aaf9f9d56a
commit 383de0146c
3 changed files with 13 additions and 55 deletions
-21
View File
@@ -1364,24 +1364,3 @@ body.tablet-mode .alert-item { font-size:0.75rem; padding:9px 11px; }
/* ── BOTTOM BAR ─────────────────────────────────────────────────── */
body.tablet-mode #bottomBar { font-size:0.7rem; height:34px; }
/* ════════════════════════════════════════════════════════════════════════
KIOSK MODE — hide noisy panels, keep it clean on Fire tablet
Only active when body.kiosk-mode (fullscreen + tablet)
════════════════════════════════════════════════════════════════════════ */
/* Hide server stats, agents tab, guardian tab in kiosk */
body.kiosk-mode #server-panel { display:none !important; }
body.kiosk-mode #tab-btn-agents { display:none !important; }
body.kiosk-mode #tab-btn-guardian { display:none !important; }
body.kiosk-mode #tab-agents { display:none !important; }
body.kiosk-mode #tab-guardian { display:none !important; }
/* Hide bottom bar: Home Assistant, Agents, Memory, Proxmox */
body.kiosk-mode #bb-ha-item { display:none !important; }
body.kiosk-mode #bb-agents-item { display:none !important; }
body.kiosk-mode #bb-memory-item { display:none !important; }
body.kiosk-mode #bb-pve-item { display:none !important; }
body.kiosk-mode #network-status-panel { display:none !important; }
/* If agents or guardian was the active tab, switch to intel */
-21
View File
@@ -1768,16 +1768,6 @@ function applyTabletMode() {
}
if (isTablet()) applyTabletMode();
// On tablet via HTTP: show a banner prompting HTTPS for mic/camera
if (isTablet() && location.protocol === "http:") {
document.addEventListener("DOMContentLoaded", () => {
const banner = document.createElement("div");
banner.style.cssText = "position:fixed;top:0;left:0;right:0;z-index:99999;background:#ff6600;color:#fff;text-align:center;padding:10px 16px;font-family:monospace;font-size:0.85rem;display:flex;align-items:center;justify-content:center;gap:12px";
banner.innerHTML = "⚠ Mic & camera require HTTPS — <a href="https://jarvis.orbishosting.com" style="color:#fff;font-weight:bold;text-decoration:underline">tap here to switch</a> &nbsp;<button onclick="this.parentNode.remove()" style="background:transparent;border:1px solid #fff;color:#fff;cursor:pointer;padding:2px 8px;font-size:0.75rem">✕</button>";
document.body.prepend(banner);
});
}
// ── KIOSK MODE ────────────────────────────────────────────────────────────────────────
let _wakeLock = null;
@@ -1793,20 +1783,11 @@ async function toggleKiosk() {
if ("wakeLock" in navigator) {
try { _wakeLock = await navigator.wakeLock.request("screen"); } catch(e) {}
}
document.body.classList.add("kiosk-mode");
// Switch away from hidden tabs if one is active
const activeTab = document.querySelector(".tab-pane.active");
if (activeTab && (activeTab.id === "tab-agents" || activeTab.id === "tab-guardian")) {
switchTab("intel");
}
document.body.classList.add("kiosk-mode");
if (btn) { btn.textContent = "⧞ EXIT"; btn.style.color = "var(--cyan)"; }
} else {
const ex = document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen;
if (ex) ex.call(document).catch(() => {});
if (_wakeLock) { _wakeLock.release().catch(() => {}); _wakeLock = null; }
document.body.classList.remove("kiosk-mode");
document.body.classList.remove("kiosk-mode");
if (btn) { btn.textContent = "⧞ KIOSK"; btn.style.color = ""; }
if (!isTablet()) document.body.classList.remove("tablet-mode");
}
@@ -1822,8 +1803,6 @@ function _onFsChange() {
const btn = document.getElementById("kioskBtn");
if (!document.fullscreenElement && !document.webkitFullscreenElement) {
if (_wakeLock) { _wakeLock.release().catch(() => {}); _wakeLock = null; }
document.body.classList.remove("kiosk-mode");
document.body.classList.remove("kiosk-mode");
if (btn) { btn.textContent = "⧞ KIOSK"; btn.style.color = ""; }
if (!isTablet()) document.body.classList.remove("tablet-mode");
}