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>
This commit is contained in:
Thomas 2021-05-11 17:49:35 +02:00 committed by GitHub
parent ebae2f4ec9
commit 1dc94c0027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 19 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed the filtering by account name in the transactions table - 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 ## 1.0.0 - 05.05.2021

View File

@ -57,9 +57,8 @@ export class AppComponent implements OnDestroy, OnInit {
this.router.events this.router.events
.pipe(filter((event) => event instanceof NavigationEnd)) .pipe(filter((event) => event instanceof NavigationEnd))
.subscribe((test) => { .subscribe(() => {
this.currentRoute = this.router.url.toString().substring(1); this.currentRoute = this.router.url.toString().substring(1);
// this.initializeTheme();
}); });
this.tokenStorageService this.tokenStorageService

View File

@ -9,7 +9,7 @@
[routerLink]="['/']" [routerLink]="['/']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'home' ? 'primary' : null" [color]="currentRoute?.startsWith('home') ? 'primary' : null"
>Overview</a >Overview</a
> >
<a <a
@ -17,7 +17,7 @@
[routerLink]="['/analysis']" [routerLink]="['/analysis']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'analysis' ? 'primary' : null" [color]="currentRoute?.startsWith('analysis') ? 'primary' : null"
>Analysis</a >Analysis</a
> >
<a <a
@ -25,7 +25,7 @@
[routerLink]="['/report']" [routerLink]="['/report']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'report' ? 'primary' : null" [color]="currentRoute?.startsWith('report') ? 'primary' : null"
>X-ray</a >X-ray</a
> >
<a <a
@ -33,7 +33,7 @@
[routerLink]="['/transactions']" [routerLink]="['/transactions']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'transactions' ? 'primary' : null" [color]="currentRoute?.startsWith('transactions') ? 'primary' : null"
>Transactions</a >Transactions</a
> >
<a <a
@ -41,7 +41,7 @@
[routerLink]="['/accounts']" [routerLink]="['/accounts']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'accounts' ? 'primary' : null" [color]="currentRoute?.startsWith('accounts') ? 'primary' : null"
>Accounts</a >Accounts</a
> >
<a <a
@ -50,7 +50,7 @@
[routerLink]="['/admin']" [routerLink]="['/admin']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'admin' ? 'primary' : null" [color]="currentRoute?.startsWith('admin') ? 'primary' : null"
>Admin Control</a >Admin Control</a
> >
<a <a
@ -58,7 +58,7 @@
[routerLink]="['/resources']" [routerLink]="['/resources']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'resources' ? 'primary' : null" [color]="currentRoute?.startsWith('resources') ? 'primary' : null"
>Resources</a >Resources</a
> >
<a <a
@ -66,7 +66,7 @@
[routerLink]="['/about']" [routerLink]="['/about']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'about' ? 'primary' : null" [color]="currentRoute?.startsWith('about') ? 'primary' : null"
>About</a >About</a
> >
<button <button
@ -130,7 +130,7 @@
[routerLink]="['/analysis']" [routerLink]="['/analysis']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'analysis' }" [ngClass]="{ 'font-weight-bold': currentRoute?.startsWith('analysis') }"
>Analysis</a >Analysis</a
> >
<a <a
@ -138,7 +138,7 @@
[routerLink]="['/report']" [routerLink]="['/report']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'report' }" [ngClass]="{ 'font-weight-bold': currentRoute?.startsWith('report') }"
>X-ray</a >X-ray</a
> >
<a <a
@ -146,7 +146,9 @@
[routerLink]="['/transactions']" [routerLink]="['/transactions']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'transactions' }" [ngClass]="{
'font-weight-bold': currentRoute?.startsWith('transactions')
}"
>Transactions</a >Transactions</a
> >
<a <a
@ -154,7 +156,7 @@
[routerLink]="['/accounts']" [routerLink]="['/accounts']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'accounts' }" [ngClass]="{ 'font-weight-bold': currentRoute?.startsWith('accounts') }"
>Accounts</a >Accounts</a
> >
<a <a
@ -162,7 +164,7 @@
[routerLink]="['/account']" [routerLink]="['/account']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'account' }" [ngClass]="{ 'font-weight-bold': currentRoute?.startsWith('account') }"
>Ghostfolio Account</a >Ghostfolio Account</a
> >
<a <a
@ -171,7 +173,7 @@
[routerLink]="['/admin']" [routerLink]="['/admin']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'admin' }" [ngClass]="{ 'font-weight-bold': currentRoute?.startsWith('admin') }"
>Admin Control</a >Admin Control</a
> >
<hr class="m-0" /> <hr class="m-0" />
@ -180,7 +182,9 @@
[routerLink]="['/resources']" [routerLink]="['/resources']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'resources' }" [ngClass]="{
'font-weight-bold': currentRoute?.startsWith('resources')
}"
>Resources</a >Resources</a
> >
<a <a
@ -188,7 +192,7 @@
[routerLink]="['/about']" [routerLink]="['/about']"
i18n i18n
mat-menu-item mat-menu-item
[ngClass]="{ 'font-weight-bold': currentRoute === 'about' }" [ngClass]="{ 'font-weight-bold': currentRoute?.startsWith('about') }"
>About Ghostfolio</a >About Ghostfolio</a
> >
<hr class="d-block d-sm-none m-0" /> <hr class="d-block d-sm-none m-0" />
@ -210,7 +214,7 @@
[routerLink]="['/about']" [routerLink]="['/about']"
i18n i18n
mat-flat-button mat-flat-button
[color]="currentRoute === 'about' ? 'primary' : null" [color]="currentRoute?.startsWith('about') ? 'primary' : null"
>About</a >About</a
> >
<a <a