fix dropdown
This commit is contained in:
@@ -36,7 +36,7 @@ export class AuthService implements IAuthService {
|
||||
}
|
||||
|
||||
signOut() {
|
||||
if (!this.isBrowser) {
|
||||
if (this.isBrowser) {
|
||||
localStorage.clear();
|
||||
this.router.navigate(['/login']).catch(error => {
|
||||
console.error('Navigation error:', error);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {Component, inject, OnInit, viewChild} from '@angular/core';
|
||||
import {Component, inject, OnInit} from '@angular/core';
|
||||
import {DarkModeService} from '../../../infrastructure/services/dark-mode.service';
|
||||
import {FormsModule, NgForm} from "@angular/forms";
|
||||
import {ToastService} from "../../../infrastructure/services/toast.service";
|
||||
import {FormsModule} from "@angular/forms";
|
||||
import {ActivatedRoute, NavigationEnd, Router, RouterLink} from "@angular/router";
|
||||
import {AuthService} from "../../../infrastructure/services/auth-service";
|
||||
import {UserStoreService} from "../../../infrastructure/services/user-store.service";
|
||||
@@ -19,7 +18,6 @@ import {filter} from "rxjs/operators";
|
||||
})
|
||||
export class HeaderComponent implements OnInit {
|
||||
|
||||
toastService = inject(ToastService);
|
||||
darkModeService = inject(DarkModeService);
|
||||
userStore = inject(UserStoreService);
|
||||
|
||||
@@ -50,7 +48,8 @@ export class HeaderComponent implements OnInit {
|
||||
while (route.firstChild) route = route.firstChild;
|
||||
|
||||
// Header-Logic
|
||||
const headerRoutes = ['/login', '/register', '/legal' , '/start'];
|
||||
// TODO hide dropdown for login register and legal
|
||||
const headerRoutes = ['/login', '/register', '/legal', '/startpage'];
|
||||
this.showDropdown = headerRoutes.some(route => event.urlAfterRedirects.startsWith(route));
|
||||
this.showOverviewTools = event.urlAfterRedirects.startsWith('/rss-feed-overview');
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { appConfig } from './app/app.config';
|
||||
import { AppComponent } from './app/app.component';
|
||||
import 'bootstrap';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig)
|
||||
.catch((err) => console.error(err));
|
||||
|
||||
Reference in New Issue
Block a user