feat: dashboard
This commit is contained in:
@@ -282,14 +282,14 @@ export class App implements OnInit, OnDestroy {
|
||||
if (!currentUserId) {
|
||||
if (!this.isPublicRoute(currentUrl)) {
|
||||
// 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.
|
||||
// /dashboard should stay on /dashboard (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';
|
||||
const isSearchLanding = currentPath === '/' || currentPath === '/dashboard';
|
||||
|
||||
if (this.isMobile() && isSearchLanding) {
|
||||
this.router.navigate(['/search'], { replaceUrl: true }).catch(() => {});
|
||||
this.router.navigate(['/dashboard'], { replaceUrl: true }).catch(() => {});
|
||||
} else {
|
||||
this.router.navigate(['/login'], {
|
||||
queryParams: {
|
||||
@@ -308,7 +308,7 @@ export class App implements OnInit, OnDestroy {
|
||||
if (
|
||||
generalSettings.reopenLastViewedChat
|
||||
&& lastViewedChat
|
||||
&& (currentUrl === '/' || currentUrl === '/search')
|
||||
&& (currentUrl === '/' || currentUrl === '/dashboard')
|
||||
) {
|
||||
this.router.navigate(['/room', lastViewedChat.roomId], { replaceUrl: true }).catch(() => {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user