fix: hide feed column in sensor dashboard mode, not just #output

The feed column (.pdir-feed-col) was left as a flex sibling with flex:1
while only its child #output was hidden, causing the sensor dashboard to
occupy ~50% width. Hide/restore the column itself in applyViewState().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-06-23 13:54:12 +01:00
parent a5a91fff69
commit 6d0b0437b3
+8 -5
View File
@@ -162,17 +162,20 @@ const SensorDashboard = (function () {
// ---- Show / hide / reset ----
function applyViewState(mode) {
const view = document.getElementById('sensorDashboardView');
const output = document.getElementById('output');
const view = document.getElementById('sensorDashboardView');
const output = document.getElementById('output');
const feedCol = document.querySelector('.pdir-feed-col');
if (mode === 'sensor') {
const saved = localStorage.getItem(STORAGE_KEY) || 'dashboard';
const isDash = saved === 'dashboard';
if (view) view.style.display = isDash ? 'block' : 'none';
if (output) output.style.display = isDash ? 'none' : '';
if (view) view.style.display = isDash ? 'block' : 'none';
if (output) output.style.display = isDash ? 'none' : '';
if (feedCol) feedCol.style.display = isDash ? 'none' : '';
_updateToggle(isDash);
} else {
if (view) view.style.display = 'none';
if (view) view.style.display = 'none';
if (feedCol) feedCol.style.display = '';
}
}