feat(launcher): add launcher_menu/header/footer URL params to URL builder; strip after apply

This commit is contained in:
Scott Idem
2026-03-16 10:39:23 -04:00
parent 9b8bc7cb73
commit 75e8a87713
2 changed files with 131 additions and 60 deletions

View File

@@ -147,6 +147,22 @@
if (param_launcher_footer === 'hide') $events_loc.launcher.hide__launcher_footer = true;
else if (param_launcher_footer === 'show') $events_loc.launcher.hide__launcher_footer = false;
});
// Strip launcher display params from the URL after applying them — same pattern
// as root layout does for ?theme / ?theme_mode. These are "one-shot" apply params;
// keeping them in the URL is misleading because toggling the CFG panel would desync.
// ?iframe is intentionally left in the URL because it is a persistent mode flag.
if (param_launcher_menu || param_launcher_header || param_launcher_footer) {
const clean_url = new URL(data.url.href);
clean_url.searchParams.delete('launcher_menu');
clean_url.searchParams.delete('launcher_header');
clean_url.searchParams.delete('launcher_footer');
goto(clean_url.pathname + clean_url.search + clean_url.hash, {
replaceState: true,
noScroll: true,
keepFocus: true
});
}
});
// String-Only ID Vision: Sync the device ID from the native environment