cleanup code, back buttons for about and profile

This commit is contained in:
Denys Vuika
2023-02-13 14:20:48 -05:00
parent 41a6c7001a
commit 5aa58dbd31
7 changed files with 16 additions and 27 deletions

View File

@@ -18,7 +18,7 @@
<ng-container *ngIf="item.children && item.children.length">
<mat-expansion-panel
[expanded]="acaExpansionPanel.isItemExpanded()"
[expanded]="acaExpansionPanel.hasActiveLinks()"
[acaExpansionPanel]="item"
#acaExpansionPanel="acaExpansionPanel"
[@.disabled]="true"

View File

@@ -64,26 +64,6 @@ export class ExpansionPanelDirective implements OnInit, OnDestroy {
return false;
}
isRouteAbout(): boolean {
return this.router.url.includes('/about');
}
isRouteProfile(): boolean {
return this.router.url.includes('/profile');
}
isRouteSearch(): boolean {
return this.router.url.includes('/search');
}
isItemExpanded() {
if (this.isRouteAbout() || this.isRouteProfile() || this.isRouteSearch()) {
return !this.hasActiveLinks();
} else {
return this.hasActiveLinks();
}
}
ngOnInit() {
this.hasActiveChildren = this.hasActiveLinks();

View File

@@ -1,8 +1,10 @@
<div class="app-profile-container">
<div class="app-profile-row">
<div class="app-profile-title">
<mat-icon class="app-profile-icon" [routerLink]="landingPage">arrow_back</mat-icon>
<h3 class="app-profile">{{'APP.EDIT_PROFILE.MY_PROFILE' | translate}}</h3>
<button mat-icon-button [routerLink]="landingPage">
<mat-icon class="app-profile-icon">arrow_back</mat-icon>
</button>
<h1 class="app-profile">{{'APP.EDIT_PROFILE.MY_PROFILE' | translate}}</h1>
</div>
</div>
<div class="app-profile-general-row" [formGroup]="profileForm">