From 9992044e2c6fb37a313f0623c0f792016a9d8668 Mon Sep 17 00:00:00 2001 From: lacksfish Date: Wed, 6 Dec 2023 11:43:59 +0100 Subject: [PATCH 1/2] Add watchfrontenddev command for npm --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 9791da23e..0025f2045 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "start": "ng serve --open", "prebuildfrontendtest": "node src/prebuild.cjs", "prebuildfrontend": "node src/prebuild.cjs", + "watchfrontenddev": "ng build --configuration development --optimization false --watch", "buildfrontendtest": "ng test --watch=false && ng build", "buildfrontend": "ng build --configuration production", "buildbackend": "tsc --project ./server/tsconfig.server.json", From fc0409c8e85056625db1537dc042741855c7500b Mon Sep 17 00:00:00 2001 From: lacksfish Date: Wed, 6 Dec 2023 11:46:58 +0100 Subject: [PATCH 2/2] Fix toggle issues in sidenav (pinning and on page refresh) --- src/app/app.component.html | 4 ++-- src/app/app.component.ts | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 3f4b696f2..2b857179c 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -19,7 +19,7 @@ - + @@ -27,7 +27,7 @@
- > +
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 4d9ab7cc5..812663fa5 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -159,7 +159,10 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy { } ngAfterViewInit() { - if (this.smallScreen || !this.flgLoggedIn) { this.sideNavigation.close(); } + if (this.smallScreen || !this.flgLoggedIn) { + this.flgSideNavOpened = !this.flgSideNavOpened; + this.sideNavigation.close(); + } this.commonService.setContainerSize(this.sideNavContent.elementRef.nativeElement.clientWidth, this.sideNavContent.elementRef.nativeElement.clientHeight); } @@ -170,6 +173,14 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy { onNavigationClicked(event: any) { if (this.smallScreen) { + this.flgSideNavOpened = !this.flgSideNavOpened; + this.sideNavigation.close(); + } + } + + backdropClicked() { + if (!this.flgSidenavPinned || this.smallScreen) { + this.flgSideNavOpened = !this.flgSideNavOpened; this.sideNavigation.close(); } }