Feature/change menu icon if menu open (#231)

* Change menu icon

* Update changelog
pull/232/head
Thomas 3 years ago committed by GitHub
parent 40696b425e
commit 80ba112bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Introduced tabs on the home page - Introduced tabs on the home page
- Changed the menu icon if the menu is open on mobile
## 1.28.0 - 24.07.2021 ## 1.28.0 - 24.07.2021

@ -106,6 +106,8 @@
class="no-min-width px-1" class="no-min-width px-1"
mat-flat-button mat-flat-button
[matMenuTriggerFor]="accountMenu" [matMenuTriggerFor]="accountMenu"
(menuClosed)="onMenuClosed()"
(menuOpened)="onMenuOpened()"
> >
<ion-icon <ion-icon
class="d-none d-sm-block" class="d-none d-sm-block"
@ -114,8 +116,8 @@
></ion-icon> ></ion-icon>
<ion-icon <ion-icon
class="d-block d-sm-none" class="d-block d-sm-none"
name="menu-outline"
size="large" size="large"
[name]="isMenuOpen ? 'close-outline' : 'menu-outline'"
></ion-icon> ></ion-icon>
</button> </button>
<mat-menu #accountMenu="matMenu" xPosition="before"> <mat-menu #accountMenu="matMenu" xPosition="before">

@ -38,6 +38,7 @@ export class HeaderComponent implements OnChanges {
public hasPermissionForSubscription: boolean; public hasPermissionForSubscription: boolean;
public hasPermissionToAccessAdminControl: boolean; public hasPermissionToAccessAdminControl: boolean;
public impersonationId: string; public impersonationId: string;
public isMenuOpen: boolean;
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();
@ -84,6 +85,14 @@ export class HeaderComponent implements OnChanges {
window.location.reload(); window.location.reload();
} }
public onMenuClosed() {
this.isMenuOpen = false;
}
public onMenuOpened() {
this.isMenuOpen = true;
}
public onSignOut() { public onSignOut() {
this.signOut.next(); this.signOut.next();
} }

Loading…
Cancel
Save