style: reformat DISPLAY_DEFAULTS to multi-line, simplify switchSettingsTab panel lookup
This commit is contained in:
@@ -133,7 +133,13 @@ var _previewSessionName = null; // track by NAME, not DOM element
|
|||||||
// ─── Settings state ───────────────────────────────────────────────────────────
|
// ─── Settings state ───────────────────────────────────────────────────────────
|
||||||
let _settingsOpen = false;
|
let _settingsOpen = false;
|
||||||
const DISPLAY_SETTINGS_KEY = 'muxplex.display';
|
const DISPLAY_SETTINGS_KEY = 'muxplex.display';
|
||||||
const DISPLAY_DEFAULTS = {fontSize: 14, hoverPreviewDelay: 1500, gridColumns: 'auto', bellSound: false, notificationPermission: 'default'};
|
const DISPLAY_DEFAULTS = {
|
||||||
|
fontSize: 14,
|
||||||
|
hoverPreviewDelay: 1500,
|
||||||
|
gridColumns: 'auto',
|
||||||
|
bellSound: false,
|
||||||
|
notificationPermission: 'default',
|
||||||
|
};
|
||||||
|
|
||||||
// ─── DOM helpers ──────────────────────────────────────────────────────────────
|
// ─── DOM helpers ──────────────────────────────────────────────────────────────
|
||||||
function $(id) {
|
function $(id) {
|
||||||
@@ -981,7 +987,7 @@ function switchSettingsTab(tabName) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
document.querySelectorAll('.settings-panel').forEach(function(panel) {
|
document.querySelectorAll('.settings-panel').forEach(function(panel) {
|
||||||
const panelTab = panel.dataset.tab || panel.dataset.panel;
|
const panelTab = panel.dataset.tab;
|
||||||
if (panelTab === tabName) {
|
if (panelTab === tabName) {
|
||||||
panel.classList.remove('hidden');
|
panel.classList.remove('hidden');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user