close navbar on a selection
This commit is contained in:
parent
4b940d046f
commit
809a9766d0
3 changed files with 6 additions and 4 deletions
|
|
@ -87,7 +87,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
} @if (isMobileNavbarOpen) {
|
||||
} @if (sharedService.isMobileNavbarOpen) {
|
||||
<app-contact-nav
|
||||
[deleteContact]="deleteContact"
|
||||
[openEditDialog]="openEditDialog"
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||
export class ContactDetailComponent {
|
||||
@Input() currentUserId!: string | undefined;
|
||||
|
||||
isMobileNavbarOpen: boolean = false;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
public sharedService: SharedService,
|
||||
|
|
@ -44,17 +42,20 @@ export class ContactDetailComponent {
|
|||
}
|
||||
|
||||
toggleNav() {
|
||||
this.isMobileNavbarOpen = !this.isMobileNavbarOpen;
|
||||
this.sharedService.isMobileNavbarOpen =
|
||||
!this.sharedService.isMobileNavbarOpen;
|
||||
}
|
||||
|
||||
openEditDialog() {
|
||||
this.sharedService.isAnyDialogOpen = true;
|
||||
this.sharedService.isEditContactDialogOpen = true;
|
||||
this.sharedService.isMobileNavbarOpen = false;
|
||||
}
|
||||
|
||||
deleteContact() {
|
||||
this.sharedService.isAnyDialogOpen = true;
|
||||
this.sharedService.isDeleteContactDialogOpen = true;
|
||||
this.sharedService.isMobileNavbarOpen = false;
|
||||
}
|
||||
|
||||
convertTimestamp(timestamp: number) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { Injectable } from '@angular/core';
|
|||
export class SharedService {
|
||||
isBtnDisabled: boolean = false;
|
||||
isAnyDialogOpen: boolean = false;
|
||||
isMobileNavbarOpen: boolean = false;
|
||||
isEditContactDialogOpen: boolean = false;
|
||||
isDeleteContactDialogOpen: boolean = false;
|
||||
isPageViewMedia: boolean = window.innerWidth <= 650;
|
||||
|
|
|
|||
Loading…
Reference in a new issue