File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,13 +85,21 @@ const vuetify = createVuetify({
8585
8686const host = new URL ( window . location . href )
8787
88+ function getDashboardReloadUrl ( ) {
89+ const setupBasePath = store . state . setup . setup ?. basePath
90+ const currentDashboardPath = window . location . pathname . match ( / ^ ( .+ ?\/ d a s h b o a r d ) (?: \/ | $ ) / ) ?. [ 1 ]
91+ const basePath = setupBasePath || currentDashboardPath || '/dashboard'
92+
93+ return new URL ( basePath , window . location . origin )
94+ }
95+
8896function forcePageReload ( err ) {
8997 console . log ( 'Reloading page:' , err )
90- console . log ( 'redirecting to:' , window . location . origin + '/dashboard' )
9198
9299 // Reloading dashboard without using cache by appending a cache-busting string to fully reload page to allow redirecting to auth
93100 const currentParams = new URLSearchParams ( window . location . search )
94- const url = new URL ( window . location . origin + '/dashboard' )
101+ const url = getDashboardReloadUrl ( )
102+ console . log ( 'redirecting to:' , url . toString ( ) )
95103 currentParams . set ( 'reloadTime' , Date . now ( ) . toString ( ) + Math . random ( ) )
96104 if ( host . searchParams . has ( 'edit-key' ) ) {
97105 currentParams . set ( 'edit-key' , host . searchParams . get ( 'edit-key' ) )
You can’t perform that action at this time.
0 commit comments