Skip to content

Commit

Permalink
add routerlink to logo
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Oct 24, 2024
1 parent a422c1c commit 884b36a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<div id="topBarHeight">
<div id="okrTopbar">
<span class="d-flex h-100 align-items-center ps-4">
<span routerLink="/" class="d-flex h-100 align-items-center ps-4 link-light cursor-pointer">
<img alt="okr-logo" height="32" ngSrc="{{ this.logoSrc$ | async }}" width="140" />
</span>
<div class="d-flex align-items-center me-md-5 me-1">
<button
*ngIf="teamManagementVisible$ | async"
routerLink="team-management"
[attr.data-testId]="'team-management'"
class="topBarEntry btn visible-by-default"
Expand All @@ -14,11 +13,6 @@
<span class="d-none d-md-flex">Teamverwaltung </span>
</button>

<button *ngIf="!(teamManagementVisible$ | async)" routerLink="/" class="topBarEntry btn visible-by-default">
<mat-icon aria-hidden="false" aria-label="Group icon" fontIcon="group"></mat-icon>
<span class="d-none d-md-flex">OKR Übersicht </span>
</button>

<button
id="hilfeButton"
class="topBarEntry btn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export class ApplicationTopBarComponent implements OnInit, OnDestroy {
}
},
});

this.initUserFullName();
this.initTeamManagementVisible();
}

ngOnDestroy(): void {
Expand All @@ -60,13 +58,4 @@ export class ApplicationTopBarComponent implements OnInit, OnDestroy {
}
});
}

private initTeamManagementVisible() {
this.teamManagementVisible$ = this.router.events.pipe(
filter((e): e is NavigationEnd => e instanceof NavigationEnd),
switchMap(() => {
return of(this.router.url.split('?')[0] === '/');
}),
);
}
}

0 comments on commit 884b36a

Please sign in to comment.