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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
} @if (isMobileNavbarOpen) {
|
} @if (sharedService.isMobileNavbarOpen) {
|
||||||
<app-contact-nav
|
<app-contact-nav
|
||||||
[deleteContact]="deleteContact"
|
[deleteContact]="deleteContact"
|
||||||
[openEditDialog]="openEditDialog"
|
[openEditDialog]="openEditDialog"
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||||
export class ContactDetailComponent {
|
export class ContactDetailComponent {
|
||||||
@Input() currentUserId!: string | undefined;
|
@Input() currentUserId!: string | undefined;
|
||||||
|
|
||||||
isMobileNavbarOpen: boolean = false;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public sharedService: SharedService,
|
public sharedService: SharedService,
|
||||||
|
|
@ -44,17 +42,20 @@ export class ContactDetailComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleNav() {
|
toggleNav() {
|
||||||
this.isMobileNavbarOpen = !this.isMobileNavbarOpen;
|
this.sharedService.isMobileNavbarOpen =
|
||||||
|
!this.sharedService.isMobileNavbarOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
openEditDialog() {
|
openEditDialog() {
|
||||||
this.sharedService.isAnyDialogOpen = true;
|
this.sharedService.isAnyDialogOpen = true;
|
||||||
this.sharedService.isEditContactDialogOpen = true;
|
this.sharedService.isEditContactDialogOpen = true;
|
||||||
|
this.sharedService.isMobileNavbarOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteContact() {
|
deleteContact() {
|
||||||
this.sharedService.isAnyDialogOpen = true;
|
this.sharedService.isAnyDialogOpen = true;
|
||||||
this.sharedService.isDeleteContactDialogOpen = true;
|
this.sharedService.isDeleteContactDialogOpen = true;
|
||||||
|
this.sharedService.isMobileNavbarOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
convertTimestamp(timestamp: number) {
|
convertTimestamp(timestamp: number) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { Injectable } from '@angular/core';
|
||||||
export class SharedService {
|
export class SharedService {
|
||||||
isBtnDisabled: boolean = false;
|
isBtnDisabled: boolean = false;
|
||||||
isAnyDialogOpen: boolean = false;
|
isAnyDialogOpen: boolean = false;
|
||||||
|
isMobileNavbarOpen: boolean = false;
|
||||||
isEditContactDialogOpen: boolean = false;
|
isEditContactDialogOpen: boolean = false;
|
||||||
isDeleteContactDialogOpen: boolean = false;
|
isDeleteContactDialogOpen: boolean = false;
|
||||||
isPageViewMedia: boolean = window.innerWidth <= 650;
|
isPageViewMedia: boolean = window.innerWidth <= 650;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue