From 1dc94c002738fb0d28c353cff2160d9a1cfc7e96 Mon Sep 17 00:00:00 2001
From: Thomas <4159106+dtslvr@users.noreply.github.com>
Date: Tue, 11 May 2021 17:49:35 +0200
Subject: [PATCH] Bugfix/keep current menu item active (#78)
* Keep current menu item active
* Update changelog
* Feature/travis (#77)
* integrate travis
* fix prettier transactions-page.component.ts
* change base branch to main
* fetch all branches in .travis.yml
* Keep current menu item active
* Update changelog
Co-authored-by: Valentin Zickner <3200232+vzickner@users.noreply.github.com>
---
CHANGELOG.md | 1 +
apps/client/src/app/app.component.ts | 3 +-
.../components/header/header.component.html | 38 ++++++++++---------
3 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92ddaa77..7af3467f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed the filtering by account name in the transactions table
+- Fixed the active menu item state when a modal has opened
## 1.0.0 - 05.05.2021
diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts
index 22e7fe6f..ad17b0c4 100644
--- a/apps/client/src/app/app.component.ts
+++ b/apps/client/src/app/app.component.ts
@@ -57,9 +57,8 @@ export class AppComponent implements OnDestroy, OnInit {
this.router.events
.pipe(filter((event) => event instanceof NavigationEnd))
- .subscribe((test) => {
+ .subscribe(() => {
this.currentRoute = this.router.url.toString().substring(1);
- // this.initializeTheme();
});
this.tokenStorageService
diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html
index 9f149743..883f8222 100644
--- a/apps/client/src/app/components/header/header.component.html
+++ b/apps/client/src/app/components/header/header.component.html
@@ -9,7 +9,7 @@
[routerLink]="['/']"
i18n
mat-flat-button
- [color]="currentRoute === 'home' ? 'primary' : null"
+ [color]="currentRoute?.startsWith('home') ? 'primary' : null"
>Overview
Analysis
X-ray
Transactions
Accounts
Admin Control
Resources
About