feat(ui): implementazione multi-layout (Blueprint, Tactical, Light, Glass) e fix visivi
This commit is contained in:
@@ -0,0 +1,279 @@
|
||||
/* =========================================
|
||||
LAYOUT 2: TACTICAL (Ispirato alla versione dark/ambra)
|
||||
========================================= */
|
||||
body.layout-tactical {
|
||||
--bg-main: #111318;
|
||||
--card-bg: #1c2128;
|
||||
--primary: #f5b041; /* Giallo/Ambra */
|
||||
--accent: #c0392b; /* Rosso scuro */
|
||||
--success: #2ecc71; /* Verde */
|
||||
--danger: #e74c3c;
|
||||
--text-main: #e6edf3;
|
||||
--text-muted: #7d8590;
|
||||
--border-main: #444c56;
|
||||
--border-light: #30363d;
|
||||
background-color: var(--bg-main);
|
||||
}
|
||||
body.layout-tactical .card, body.layout-tactical .modal-content {
|
||||
background: var(--card-bg) !important;
|
||||
border: 1px solid var(--border-light) !important;
|
||||
border-radius: 4px !important;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.4) !important;
|
||||
}
|
||||
body.layout-tactical .title-brand {
|
||||
color: var(--primary);
|
||||
}
|
||||
body.layout-tactical .tactical-led {
|
||||
border-radius: 2px !important; /* LED quadrati e rigidi */
|
||||
}
|
||||
body.layout-tactical .terminal-log {
|
||||
background: #0d1117;
|
||||
border-color: var(--border-light);
|
||||
}
|
||||
|
||||
/* =========================================
|
||||
LAYOUT 3: LIGHT (Clean & Bright - Modalità diurna)
|
||||
========================================= */
|
||||
body.layout-light {
|
||||
--bg-main: #f8fafc;
|
||||
--card-bg: #ffffff;
|
||||
--primary: #0ea5e9; /* Azzurro pulito */
|
||||
--accent: #8b5cf6;
|
||||
--success: #10b981;
|
||||
--danger: #ef4444;
|
||||
--text-main: #1e293b;
|
||||
--text-muted: #64748b;
|
||||
--border-main: #cbd5e1;
|
||||
--border-light: #e2e8f0;
|
||||
|
||||
background-color: var(--bg-main) !important;
|
||||
background-image: none !important; /* Rimozione della griglia blueprint! */
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
/* --- Override for the main layout grid from original style.css --- */
|
||||
body.layout-light div.card,
|
||||
body.layout-light div.modal-content,
|
||||
body.layout-light div.mini-card {
|
||||
background: #ffffff !important;
|
||||
border: 1px solid var(--border-main) !important;
|
||||
border-radius: 8px !important;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
|
||||
}
|
||||
|
||||
body.layout-light .filter-bar {
|
||||
background: #ffffff !important;
|
||||
border: 1px solid var(--border-main) !important;
|
||||
}
|
||||
|
||||
body.layout-light .filter-pill {
|
||||
color: var(--text-muted) !important;
|
||||
border-color: var(--border-main) !important;
|
||||
}
|
||||
body.layout-light .filter-pill.active {
|
||||
color: var(--primary) !important;
|
||||
border-color: var(--primary) !important;
|
||||
background: #f0f9ff !important;
|
||||
}
|
||||
body.layout-light .filter-pill:hover {
|
||||
background: #f8fafc !important;
|
||||
}
|
||||
|
||||
/* Fix per la mappa */
|
||||
body.layout-light .dark-tiles {
|
||||
filter: none !important;
|
||||
-webkit-filter: none !important;
|
||||
}
|
||||
|
||||
body.layout-light .custom-map-pin.pin-online {
|
||||
background: var(--success);
|
||||
border-color: #059669;
|
||||
box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
|
||||
color: white;
|
||||
}
|
||||
body.layout-light .custom-map-pin.pin-offline {
|
||||
background: var(--danger);
|
||||
border-color: #b91c1c;
|
||||
box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* --- Top Bar --- */
|
||||
body.layout-light #top-bar-container,
|
||||
body.layout-light #top-bar {
|
||||
background: #ffffff !important;
|
||||
border-bottom: 1px solid var(--border-main) !important;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.03);
|
||||
}
|
||||
body.layout-light .title-brand {
|
||||
color: var(--primary) !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Testi scuri sulle mini card */
|
||||
body.layout-light .mini-card-name {
|
||||
color: var(--text-main) !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
body.layout-light .mini-card[style*="grayscale"] {
|
||||
opacity: 0.5 !important;
|
||||
background: #f1f5f9 !important;
|
||||
}
|
||||
|
||||
/* Bottoni, Tab e Navigazione */
|
||||
body.layout-light .nav-tab { color: var(--text-muted); }
|
||||
body.layout-light .nav-tab.active {
|
||||
color: var(--primary) !important;
|
||||
border-bottom: 2px solid var(--primary) !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
body.layout-light .theme-switch {
|
||||
border: 1px solid var(--border-main) !important;
|
||||
color: var(--text-muted) !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
body.layout-light .btn-cmd {
|
||||
color: var(--text-main) !important;
|
||||
border-color: var(--border-main) !important;
|
||||
background: #ffffff;
|
||||
}
|
||||
body.layout-light .btn-cmd:hover {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
/* Fix per i pannelli informativi a bordo */
|
||||
body.layout-light .freq-bar,
|
||||
body.layout-light .node-meta,
|
||||
body.layout-light .health-bar {
|
||||
border-color: var(--border-light) !important;
|
||||
color: var(--text-muted) !important;
|
||||
}
|
||||
body.layout-light .health-bar span {
|
||||
border-right-color: var(--border-light) !important;
|
||||
}
|
||||
body.layout-light .seen-bar {
|
||||
border-color: var(--border-light) !important;
|
||||
}
|
||||
|
||||
/* Testo interno delle Card dei Nodi */
|
||||
body.layout-light .client-name {
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
body.layout-light .badge-id {
|
||||
color: var(--text-muted) !important;
|
||||
}
|
||||
body.layout-light .type-badge.type-repeater {
|
||||
color: var(--primary) !important;
|
||||
border-color: var(--primary) !important;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
body.layout-light .status-display {
|
||||
color: var(--text-main) !important;
|
||||
border-color: var(--border-light) !important;
|
||||
}
|
||||
|
||||
/* Fix tabelle */
|
||||
body.layout-light table { background: transparent; }
|
||||
body.layout-light thead th, body.layout-light thead tr {
|
||||
background: #f1f5f9 !important;
|
||||
color: var(--text-muted) !important;
|
||||
border-bottom: 2px solid var(--border-main) !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
body.layout-light tbody tr, body.layout-light td {
|
||||
background: #ffffff !important;
|
||||
border-bottom: 1px solid var(--border-light) !important;
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
body.layout-light tbody tr:nth-child(even), body.layout-light tbody tr:nth-child(even) td {
|
||||
background: #f8fafc !important;
|
||||
}
|
||||
body.layout-light tbody tr:hover, body.layout-light tbody tr:hover td {
|
||||
background: #f1f5f9 !important;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
body.layout-light select, body.layout-light input, body.layout-light textarea {
|
||||
background: #ffffff !important;
|
||||
color: var(--text-main) !important;
|
||||
border: 1px solid var(--border-main) !important;
|
||||
}
|
||||
body.layout-light .terminal-log {
|
||||
background: #f1f5f9 !important;
|
||||
color: #334155 !important;
|
||||
border-color: var(--border-main) !important;
|
||||
}
|
||||
|
||||
/* Fix visibilità dei pin mappa nel tema chiaro */
|
||||
body.layout-light .custom-map-pin {
|
||||
color: #ffffff !important;
|
||||
font-weight: bold !important;
|
||||
font-size: 16px !important;
|
||||
line-height: 24px !important;
|
||||
}
|
||||
body.layout-light .custom-map-pin.pin-online {
|
||||
background-color: var(--success) !important;
|
||||
border: 2px solid #059669 !important;
|
||||
box-shadow: 0 0 12px rgba(16, 185, 129, 0.6) !important;
|
||||
}
|
||||
body.layout-light .custom-map-pin.pin-offline {
|
||||
background-color: var(--danger) !important;
|
||||
border: 2px solid #b91c1c !important;
|
||||
box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
|
||||
}
|
||||
body.layout-light .custom-map-pin.pin-tx {
|
||||
background-color: var(--primary) !important;
|
||||
border: 2px solid #0284c7 !important;
|
||||
box-shadow: 0 0 15px rgba(2, 132, 199, 0.8) !important;
|
||||
}
|
||||
body.layout-light .custom-map-pin.pin-warn {
|
||||
background-color: var(--accent) !important;
|
||||
border: 2px solid #7c3aed !important;
|
||||
}
|
||||
|
||||
/* Fix per i container delle popup di Leaflet */
|
||||
body.layout-light .leaflet-popup-content-wrapper,
|
||||
body.layout-light .leaflet-popup-tip {
|
||||
background: #ffffff !important;
|
||||
color: var(--text-main) !important;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
|
||||
}
|
||||
body.layout-light .leaflet-popup-content div {
|
||||
color: var(--text-main);
|
||||
}
|
||||
/* =========================================
|
||||
LAYOUT 4: GLASSMORPHISM & NEON
|
||||
Layout moderno, traslucido con sfocature
|
||||
========================================= */
|
||||
body.layout-glass {
|
||||
--bg-main: #0f172a;
|
||||
--primary: #38bdf8;
|
||||
--accent: #c084fc;
|
||||
--success: #34d399;
|
||||
--danger: #fb7185;
|
||||
--card-bg: rgba(255, 255, 255, 0.03);
|
||||
--border-light: rgba(255,255,255,0.1);
|
||||
background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
body.layout-glass .card, body.layout-glass .modal-content {
|
||||
background: var(--card-bg) !important;
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border: 1px solid rgba(255,255,255,0.08) !important;
|
||||
border-radius: 24px !important;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
|
||||
}
|
||||
body.layout-glass .btn-cmd, body.layout-glass .filter-pill {
|
||||
border-radius: 12px;
|
||||
}
|
||||
body.layout-glass .card-header {
|
||||
border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
body.layout-glass input, body.layout-glass select, body.layout-glass textarea {
|
||||
background: rgba(0,0,0,0.3);
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
@@ -20,6 +20,33 @@ let currentMmdvmConfig = "";
|
||||
let currentMmdvmConfigAlias = "";
|
||||
let currentMmdvmServiceName = "";
|
||||
|
||||
// --- LAYOUT SWITCHER ---
|
||||
const layouts = ['layout-blueprint', 'layout-tactical', 'layout-light', 'layout-glass'];
|
||||
const layoutLabels = ['[ L: BLU ]', '[ L: TAC ]', '[ L: LGT ]', '[ L: GLASS ]'];
|
||||
let currentLayoutIdx = 0;
|
||||
|
||||
function initLayout() {
|
||||
const saved = localStorage.getItem('fleetLayout') || 'layout-blueprint';
|
||||
currentLayoutIdx = layouts.indexOf(saved) > -1 ? layouts.indexOf(saved) : 0;
|
||||
applyLayout();
|
||||
}
|
||||
|
||||
function cycleLayout() {
|
||||
currentLayoutIdx = (currentLayoutIdx + 1) % layouts.length;
|
||||
localStorage.setItem('fleetLayout', layouts[currentLayoutIdx]);
|
||||
applyLayout();
|
||||
}
|
||||
|
||||
function applyLayout() {
|
||||
document.body.classList.remove(...layouts);
|
||||
if (layouts[currentLayoutIdx] !== 'layout-blueprint') {
|
||||
document.body.classList.add(layouts[currentLayoutIdx]);
|
||||
}
|
||||
const btn = document.getElementById('layout-btn');
|
||||
if (btn) btn.innerText = layoutLabels[currentLayoutIdx];
|
||||
}
|
||||
|
||||
|
||||
// Mappatura Modo -> Gateway service name
|
||||
const MODE_GATEWAYS = {
|
||||
'DMR': ['dmrgateway'],
|
||||
@@ -98,6 +125,7 @@ function closeNodeFocus() {
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const savedView = localStorage.getItem('fleetDefaultView') || 'home';
|
||||
switchView(savedView);
|
||||
initLayout();
|
||||
initUI();
|
||||
checkPushStatus();
|
||||
setInterval(refreshStates, 15000);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
<!-- Foglio di Stile Esterno Modularizzato (Cache Buster) -->
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=blueprint-header-fix">
|
||||
<!-- Foglio Stili Layout Alternativi -->
|
||||
<link rel="stylesheet" href="/static/css/layouts.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -36,6 +38,7 @@
|
||||
|
||||
<div class="top-bar-right">
|
||||
<span id="mqtt-badge" class="mqtt-badge mqtt-offline">MQTT: CHK</span>
|
||||
<button class="theme-switch" id="layout-btn" onclick="cycleLayout()" title="Cambia Layout">[ L: BLU ]</button>
|
||||
<button class="theme-switch" id="lang-btn" onclick="toggleLang()" data-i18n-title="ttLang">ITA</button>
|
||||
<button class="theme-switch" id="push-btn" onclick="subscribeToPush()">PUSH</button>
|
||||
<div id="auth-container" style="display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end;"></div>
|
||||
@@ -268,7 +271,7 @@
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div style="text-align: center; padding: 25px; color: var(--border-light); font-size: 0.85rem; font-weight: 300; display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap;">
|
||||
<div style="text-align: center; padding: 25px; color: var(--text-muted); font-size: 0.85rem; font-weight: 300; display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap;">
|
||||
<span>SYS_OP: IV3JDV @ ARIFVG</span>
|
||||
<span>|</span>
|
||||
<a href="https://git.arifvg.it/iv3jdv/fleet-control-server" target="_blank" style="color: inherit; text-decoration: none;">GITEA_REPO</a>
|
||||
|
||||
Reference in New Issue
Block a user