Fix packet sidebar retention

This commit is contained in:
Jack Kingsman
2026-03-03 09:05:21 -08:00
parent 4c1d5fb8ec
commit 707f98d203
3 changed files with 17 additions and 1 deletions
+6
View File
@@ -12,6 +12,7 @@ export interface VisualizerSettings {
pruneStaleNodes: boolean;
autoOrbit: boolean;
showControls: boolean;
hidePacketFeed: boolean;
}
export const VISUALIZER_DEFAULTS: VisualizerSettings = {
@@ -26,6 +27,7 @@ export const VISUALIZER_DEFAULTS: VisualizerSettings = {
pruneStaleNodes: false,
autoOrbit: false,
showControls: true,
hidePacketFeed: false,
};
export function getVisualizerSettings(): VisualizerSettings {
@@ -74,6 +76,10 @@ export function getVisualizerSettings(): VisualizerSettings {
typeof parsed.showControls === 'boolean'
? parsed.showControls
: VISUALIZER_DEFAULTS.showControls,
hidePacketFeed:
typeof parsed.hidePacketFeed === 'boolean'
? parsed.hidePacketFeed
: VISUALIZER_DEFAULTS.hidePacketFeed,
};
} catch {
return { ...VISUALIZER_DEFAULTS };