test: Ensure tests work after latest changes
All checks were successful
Queue Release Build / prepare (push) Successful in 17s
Deploy Web Apps / deploy (push) Successful in 7m20s
Queue Release Build / build-windows (push) Successful in 25m4s
Queue Release Build / build-linux (push) Successful in 33m59s
Queue Release Build / finalize (push) Successful in 41s

This commit is contained in:
2026-05-19 00:52:28 +02:00
parent 54e8b9a5e4
commit 232a9ea8ea
9 changed files with 114 additions and 26 deletions

View File

@@ -267,11 +267,22 @@ export class App implements OnInit, OnDestroy {
if (!currentUserId) {
if (!this.isPublicRoute(currentUrl)) {
this.router.navigate(['/login'], {
queryParams: {
returnUrl: currentUrl
}
}).catch(() => {});
// On mobile, new/unauthenticated visitors landing on the app root or
// /search should stay on /search (which already exposes a login CTA).
// The login form has no mobile chrome / back button, so dropping new
// users straight onto it leaves them with no way to navigate away.
const currentPath = this.getRoutePath(currentUrl);
const isSearchLanding = currentPath === '/' || currentPath === '/search';
if (this.isMobile() && isSearchLanding) {
this.router.navigate(['/search'], { replaceUrl: true }).catch(() => {});
} else {
this.router.navigate(['/login'], {
queryParams: {
returnUrl: currentUrl
}
}).catch(() => {});
}
}
} else {
this.store.dispatch(UsersActions.loadCurrentUser());