diff --git a/VERSION b/VERSION index 85a5e00..be8c9e1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.150 +0.0.151 diff --git a/frontend/mobile.html b/frontend/mobile.html index 9cc853e..bc41f6d 100644 --- a/frontend/mobile.html +++ b/frontend/mobile.html @@ -36,8 +36,8 @@ diff --git a/frontend/static/mobile.css b/frontend/static/mobile.css index 61dc85c..c771f0f 100644 --- a/frontend/static/mobile.css +++ b/frontend/static/mobile.css @@ -46,14 +46,16 @@ html, body { .m-empty { color: #8b93a7; text-align: center; padding: 28px 16px; font-size: 14px; } .m-tabs { - flex: none; display: flex; background: #161a22; border-top: 1px solid #272d3a; - padding-bottom: env(safe-area-inset-bottom, 0); + flex: none; display: flex; justify-content: center; background: #161a22; + border-top: 1px solid #272d3a; padding: 8px 12px; + padding-bottom: calc(8px + env(safe-area-inset-bottom, 0)); } -.m-tab { - flex: 1; background: none; border: 0; color: #8b93a7; cursor: pointer; - padding: 9px 0 11px; font-size: 11px; font-family: inherit; - display: flex; flex-direction: column; align-items: center; gap: 3px; +/* одна кнопка-переключатель режима (или/или): показывает текущий режим, тап — меняет */ +.m-mode { + display: inline-flex; align-items: center; justify-content: center; gap: 10px; + min-width: 190px; background: #1d2230; color: #e6e9ef; border: 1px solid #272d3a; + border-radius: 10px; padding: 12px 28px; cursor: pointer; + font: 600 15px/1 inherit; letter-spacing: .3px; } -.m-tab .i { font-size: 22px; line-height: 1; } -.m-tab.active { color: #fff; } -.m-tab.active .i { color: #c0392b; } +.m-mode:active { background: #232a3a; } +.m-mode .i { font-size: 18px; color: #c0392b; } diff --git a/frontend/static/mobile.js b/frontend/static/mobile.js index 9292a3f..6ed149b 100644 --- a/frontend/static/mobile.js +++ b/frontend/static/mobile.js @@ -14,7 +14,7 @@ async function api(url) { } const M = { - cams: [], liveId: null, archId: null, date: null, + cams: [], liveId: null, archId: null, date: null, view: "live", async init() { let data; @@ -44,15 +44,16 @@ const M = { else if (lv.webkitEnterFullscreen) lv.webkitEnterFullscreen(); // iOS }); - document.querySelectorAll(".m-tab").forEach((tb) => { - tb.onclick = () => this.showView(tb.dataset.view); - }); + // одна кнопка снизу — переключатель режима (или/или): Live ⇄ Архив + document.getElementById("m-mode").onclick = () => + this.showView(this.view === "live" ? "arch" : "live"); this.showView("live"); }, showView(v) { - document.querySelectorAll(".m-tab").forEach((t) => t.classList.toggle("active", t.dataset.view === v)); + this.view = v; + document.getElementById("m-mode-name").textContent = v === "live" ? "Live" : "Архив"; document.getElementById("view-live").hidden = v !== "live"; document.getElementById("view-arch").hidden = v !== "arch"; if (v === "live") { this.stopArch(); this.startLive(); }