From a00ebef5cc475abd4473183f7040c480e335ac10 Mon Sep 17 00:00:00 2001 From: Yasa-Nataliya Date: Thu, 9 Feb 2023 17:40:52 +0000 Subject: [PATCH] Added expand and collapse functionality --- .../aca-about/src/lib/about.component.html | 4 +- .../aca-about/src/lib/about.component.scss | 10 ++++ projects/aca-about/src/lib/about.component.ts | 6 ++- projects/aca-content/assets/i18n/en.json | 3 +- .../components/sidenav/sidenav.component.html | 4 +- .../components/sidenav/sidenav.component.ts | 10 +++- .../view-profile/view-profile.component.html | 2 +- .../view-profile/view-profile.component.scss | 10 ++++ .../view-profile/view-profile.component.ts | 5 +- .../content-service-extension.service.ts | 8 +++ .../page-layout/page-layout.component.html | 14 ++++-- .../page-layout/page-layout.component.scss | 50 +++++++++++++++---- .../page-layout/page-layout.component.ts | 19 ++++++- .../page-layout/page-layout.module.ts | 3 +- 14 files changed, 122 insertions(+), 26 deletions(-) diff --git a/projects/aca-about/src/lib/about.component.html b/projects/aca-about/src/lib/about.component.html index 5791cb2fc..b2e7a735e 100644 --- a/projects/aca-about/src/lib/about.component.html +++ b/projects/aca-about/src/lib/about.component.html @@ -1,5 +1,4 @@ - - + @@ -26,4 +25,3 @@ - diff --git a/projects/aca-about/src/lib/about.component.scss b/projects/aca-about/src/lib/about.component.scss index caf329f4a..ad19c222c 100644 --- a/projects/aca-about/src/lib/about.component.scss +++ b/projects/aca-about/src/lib/about.component.scss @@ -2,3 +2,13 @@ adf-about { padding: 10px; width: 100%; } + +.app-about-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + bottom: 0; + right: 0; + height: 100%; +} diff --git a/projects/aca-about/src/lib/about.component.ts b/projects/aca-about/src/lib/about.component.ts index ecb413155..42d1f0ec0 100644 --- a/projects/aca-about/src/lib/about.component.ts +++ b/projects/aca-about/src/lib/about.component.ts @@ -30,6 +30,7 @@ import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions'; import { AuthenticationService, RepositoryInfo } from '@alfresco/adf-core'; import { DiscoveryApiService } from '@alfresco/adf-content-services'; import { PACKAGE_JSON } from './package-json.token'; +import { ContentServiceExtensionService } from '../../../aca-content/src/lib/services/content-service-extension.service'; @Component({ selector: 'app-about-page', @@ -41,6 +42,7 @@ export class AboutComponent implements OnInit { dev = false; extensions$: Observable; repository: RepositoryInfo = null; + hideSidenav: boolean; constructor( @Inject(DEV_MODE_TOKEN) devMode, @@ -49,7 +51,8 @@ export class AboutComponent implements OnInit { public packageJson, private authService: AuthenticationService, private appExtensions: AppExtensionService, - private discovery: DiscoveryApiService + private discovery: DiscoveryApiService, + private contentServices: ContentServiceExtensionService ) { this.dev = !devMode; this.extensions$ = this.appExtensions.references$; @@ -59,6 +62,7 @@ export class AboutComponent implements OnInit { if (this.authService.isEcmLoggedIn()) { this.setECMInfo(); } + this.contentServices.cast.subscribe((data) => (this.hideSidenav = data)); } setECMInfo() { diff --git a/projects/aca-content/assets/i18n/en.json b/projects/aca-content/assets/i18n/en.json index f469fe11c..14e51352e 100644 --- a/projects/aca-content/assets/i18n/en.json +++ b/projects/aca-content/assets/i18n/en.json @@ -427,7 +427,8 @@ "TOOLTIPS": { "COLLAPSE_NAVIGATION": "Collapse navigation menu", "OPTIONS_SETTINGS": "Options and settings", - "MY_PROFILE": "My profile" + "MY_PROFILE": "My profile", + "EXPAND_NAVIGATION": "Expand navigation" } }, "NODE_SELECTOR": { diff --git a/projects/aca-content/src/lib/components/sidenav/sidenav.component.html b/projects/aca-content/src/lib/components/sidenav/sidenav.component.html index 8b0a19915..6da2dcfb1 100644 --- a/projects/aca-content/src/lib/components/sidenav/sidenav.component.html +++ b/projects/aca-content/src/lib/components/sidenav/sidenav.component.html @@ -1,8 +1,8 @@ -
+
-