mirror of
https://github.com/smittix/intercept.git
synced 2026-07-08 01:28:13 -07:00
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:
@@ -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 = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user