fix(webui): preserve import tab refresh URLs
- stop the legacy shell bootstrap from collapsing /import/auto and /import/singles back to the import root on reload\n- update the shell route smoke test to expect the canonical /import/album redirect for the bare import page
This commit is contained in:
parent
ae0711f464
commit
b78350a3e2
2 changed files with 5 additions and 3 deletions
|
|
@ -1190,9 +1190,7 @@ async function loadInitialData() {
|
|||
if (route?.kind === 'react') {
|
||||
showReactHost(targetPage);
|
||||
setActivePageChrome(targetPage);
|
||||
if (window.location.pathname !== route.path) {
|
||||
history.replaceState({ page: targetPage }, '', route.path);
|
||||
}
|
||||
// Keep nested react-tab URLs like /import/auto or /import/singles intact.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@ function expectedUrlPattern(path: string, pageId: ShellPageId): RegExp {
|
|||
return /\/stats(?:\?range=7d)?$/;
|
||||
}
|
||||
|
||||
if (pageId === 'import') {
|
||||
return /\/import\/album$/;
|
||||
}
|
||||
|
||||
return new RegExp(`${path.replace('/', '\\/')}$`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue