Skip to content

Commit 5fa4180

Browse files
committed
fix: ensure lockSettings works properly with new panel,
1 parent d617860 commit 5fa4180

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/url-params.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { menu, weather } from './dom-elements';
1+
import { menu, panel, weather } from './dom-elements';
22
import { presetLocalJSON } from '../importExport';
33
import { logConsole, setMenuTheme, showToast } from './dom-utils';
44
import { setDebug, setLockSettings, setTimeRefresh } from './debug';
@@ -170,7 +170,7 @@ export async function applyURLParams() {
170170
.otherwise((invalidTheme) => {
171171
logConsole(`Invalid theme: ${invalidTheme}, defaulting to auto`, 'warning');
172172
setMenuTheme('auto', true);
173-
});
173+
});
174174

175175
// Clock mode
176176
match(params.clockMode)
@@ -182,7 +182,7 @@ export async function applyURLParams() {
182182
})
183183
.otherwise(() => {
184184
setClockMode();
185-
})
185+
});
186186

187187
// Weather
188188
if (params.weatherApi !== undefined && params.weatherLat !== undefined && params.weatherLon !== undefined && (params.weatherUnits == 'imperial' || params.weatherUnits == 'metric')) {
@@ -250,6 +250,7 @@ export async function applyURLParams() {
250250
if (params.lockSettings) {
251251
setLockSettings(true);
252252
menu.container.remove();
253+
panel.container.remove();
253254
logConsole('Settings locked - Menu container removed...', 'info');
254255
}
255256
}

0 commit comments

Comments
 (0)