feat(cluster): withdraw the two spot display options
Hidden from the filter panel and forced off, without touching the machinery behind them — it is correct and took several rounds to get right, so it stays whole. One flag in lib/spotDisplay does both jobs: readSpotDisplayOptions answers false while it is down, which covers the band map, and App.tsx seeds its two states from that same call instead of reading localStorage directly. Without that second half an operator who already had "No colour on worked" saved would have kept it applied with no switch left to turn it off. The saved preferences are deliberately left in localStorage rather than cleared, so whoever had either option on gets their choice back the day the switches return instead of silently starting from off.
This commit is contained in:
@@ -13,7 +13,17 @@
|
||||
|
||||
export type SpotDisplayOptions = { muteWorked: boolean; slotHighlight: boolean };
|
||||
|
||||
// Both options are withdrawn from the filter panel for now. The machinery below
|
||||
// is deliberately kept whole — it is correct and hard-won — so putting the two
|
||||
// switches back is this one flag and the block they came from in App.tsx.
|
||||
//
|
||||
// The saved preferences are left untouched in localStorage rather than cleared:
|
||||
// an operator who had either turned on gets them back exactly as they were the
|
||||
// day the options return, instead of silently starting from off.
|
||||
export const SPOT_DISPLAY_OPTIONS_EXPOSED = false;
|
||||
|
||||
export function readSpotDisplayOptions(): SpotDisplayOptions {
|
||||
if (!SPOT_DISPLAY_OPTIONS_EXPOSED) return { muteWorked: false, slotHighlight: false };
|
||||
try {
|
||||
return {
|
||||
muteWorked: localStorage.getItem('opslog.clusterMuteWorked') === '1',
|
||||
|
||||
Reference in New Issue
Block a user