From 244d3ef1fd98442f70516576d7ad3547860c33e7 Mon Sep 17 00:00:00 2001 From: Albert Goral Date: Wed, 13 May 2026 10:28:16 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"Poprawki=20sterowanie=20galeri=C4=85"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ba6c1c78ef880783a8c0da07a434b5dcd4c6d2f0. --- dashboard.html | 143 +++++++++++++++++++++---------------------------- 1 file changed, 62 insertions(+), 81 deletions(-) diff --git a/dashboard.html b/dashboard.html index bfa5bca..d61e61f 100644 --- a/dashboard.html +++ b/dashboard.html @@ -54,7 +54,7 @@ background-color: rgba(107, 114, 128, 0.8); border-width: 2px; } - + /* Ochrona przed skakaniem interfejsu */ body { overflow-y: scroll; } @@ -65,13 +65,13 @@
- +
UniView WebAdmin
- +
- +
- +
@@ -369,7 +366,7 @@ pop.classList.add('opacity-100', 'visible', 'scale-100'); } } - + function closePopover(locId) { if(state.openPopoverId === locId) state.openPopoverId = null; const pop = document.getElementById(`popover-${locId}`); @@ -393,15 +390,15 @@ if (!locationsMap.has(locId)) locationsMap.set(locId, { id: locId, label: t.location_name || locId, terminals: [] }); locationsMap.get(locId).terminals.push(t); }); - + let locations = Array.from(locationsMap.values()).sort((a,b) => String(a.label).localeCompare(String(b.label), 'pl', {numeric: true})); - + // Filtrowanie if(state.filter) { locations = locations.filter(loc => { const matchLoc = loc.label.toLowerCase().includes(state.filter); - const matchTerminals = loc.terminals.some(t => - (t.name || "").toLowerCase().includes(state.filter) || + const matchTerminals = loc.terminals.some(t => + (t.name || "").toLowerCase().includes(state.filter) || (t.ip || "").includes(state.filter) ); return matchLoc || matchTerminals; @@ -409,7 +406,7 @@ } renderGlobalExhibition(locations); - + const grid = document.getElementById("nscLocationGrid"); grid.innerHTML = locations.map(renderLocationCard).join(""); @@ -420,7 +417,7 @@ // Usuwamy klasy animacji tymczasowo, by nie "wjeżdżał" co 5 sekund pop.classList.remove('transition-all', 'duration-300', 'opacity-0', 'invisible', 'scale-95', 'pointer-events-none'); pop.classList.add('opacity-100', 'visible', 'scale-100'); - + const scrollArea = pop.querySelector('.custom-scrollbar'); if (scrollArea) scrollArea.scrollTop = currentScroll; // Przywracamy przewijanie! @@ -441,7 +438,7 @@ const onT = allT.filter(t => t.status?.toLowerCase() === 'running').length; const total = allT.length; const pct = total ? Math.round((onT/total)*100) : 0; - + let colorCls = "bg-slate-100 text-slate-500 border-slate-200 dark:bg-slate-800 dark:text-slate-400 dark:border-slate-700"; let fillCls = "bg-slate-400"; if(total > 0 && onT === total) { colorCls = "bg-emerald-50 text-emerald-700 border-emerald-200 dark:bg-emerald-900/20 dark:text-emerald-400 dark:border-emerald-800/50"; fillCls = "bg-emerald-500"; } @@ -458,7 +455,7 @@

Zarządzanie całą wystawą (Galerie: ${locations.length})

- +
Uruchomione @@ -481,10 +478,10 @@ const total = loc.terminals.length; const on = loc.terminals.filter(t => t.status?.toLowerCase() === 'running').length; const pct = total ? Math.round((on/total)*100) : 0; - + const pcs = loc.terminals.filter(t => t.player === 'PC'); const onPcs = pcs.filter(t => t.status?.toLowerCase() === 'running').length; - + const lights = loc.terminals.filter(t => t.player === 'CTRL'); const onLights = lights.filter(t => t.status?.toLowerCase() === 'running').length; @@ -494,17 +491,17 @@ return `
- - -
- -
-

${escapeHtml(loc.label)}

+ +
+ +
+

${escapeHtml(loc.label)}

+
${loc.id}
- -
- + +
+
- -
@@ -566,12 +560,12 @@
- +