diff --git a/app/static/css/style.css b/app/static/css/style.css index 999cb5e..52f5d2f 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -1240,9 +1240,9 @@ main { color: white; } -/* Search FAB button (orange gradient) */ +/* Search FAB button (muted teal) */ .fab-search { - background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%); + background: linear-gradient(135deg, #5fa8a0 0%, #4a8f88 100%); color: white; } diff --git a/app/static/js/app.js b/app/static/js/app.js index 49302cb..42b5c5c 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -1303,19 +1303,10 @@ async function loadDeviceInfo() { return; } - // Parse JSON from the info string - let info; - try { - // Extract JSON part (skip the header lines like "MarWoj|*...") - const jsonMatch = data.info.match(/\{[\s\S]*\}/); - info = jsonMatch ? JSON.parse(jsonMatch[0]) : null; - } catch (e) { - container.innerHTML = `
${escapeHtml(data.info)}
`; - return; - } - - if (!info) { - container.innerHTML = `
${escapeHtml(data.info)}
`; + // API returns info as a dict directly (v2 DeviceManager) + const info = data.info; + if (!info || typeof info !== 'object') { + container.innerHTML = `
No device info available
`; return; } @@ -1401,11 +1392,11 @@ async function loadDeviceStats() { const bat = data.battery || {}; let html = ''; - // Battery + // Battery (from dedicated get_bat or from core stats) if (bat && typeof bat === 'object' && bat.voltage) { html += ``; - } else if (bat) { - html += ``; + } else if (stats.core && stats.core.battery_mv) { + html += ``; } // Core stats diff --git a/app/static/js/sw.js b/app/static/js/sw.js index 0f9c7f6..96d1a0e 100644 --- a/app/static/js/sw.js +++ b/app/static/js/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'mc-webui-v7'; +const CACHE_NAME = 'mc-webui-v8'; const ASSETS_TO_CACHE = [ '/', '/static/css/style.css',
Battery${bat.voltage}V
Battery${bat}
Battery${(stats.core.battery_mv / 1000).toFixed(2)}V