diff --git a/projects/aca-about/src/lib/about.component.ts b/projects/aca-about/src/lib/about.component.ts
index 42d1f0ec0..3ddb23029 100644
--- a/projects/aca-about/src/lib/about.component.ts
+++ b/projects/aca-about/src/lib/about.component.ts
@@ -30,7 +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';
+import { AppService } from '@alfresco/aca-shared';
@Component({
selector: 'app-about-page',
@@ -52,7 +52,7 @@ export class AboutComponent implements OnInit {
private authService: AuthenticationService,
private appExtensions: AppExtensionService,
private discovery: DiscoveryApiService,
- private contentServices: ContentServiceExtensionService
+ private appServices: AppService
) {
this.dev = !devMode;
this.extensions$ = this.appExtensions.references$;
@@ -62,7 +62,7 @@ export class AboutComponent implements OnInit {
if (this.authService.isEcmLoggedIn()) {
this.setECMInfo();
}
- this.contentServices.cast.subscribe((data) => (this.hideSidenav = data));
+ this.appServices.cast.subscribe((data) => (this.hideSidenav = data));
}
setECMInfo() {
diff --git a/projects/aca-content/assets/svg/icons/avatar.svg b/projects/aca-content/assets/svg/icons/avatar.svg
new file mode 100644
index 000000000..96f0cb29d
--- /dev/null
+++ b/projects/aca-content/assets/svg/icons/avatar.svg
@@ -0,0 +1,4 @@
+
diff --git a/projects/aca-content/assets/svg/icons/menu.svg b/projects/aca-content/assets/svg/icons/menu.svg
new file mode 100644
index 000000000..f09df24f2
--- /dev/null
+++ b/projects/aca-content/assets/svg/icons/menu.svg
@@ -0,0 +1,11 @@
+
diff --git a/projects/aca-content/assets/svg/icons/settings.svg b/projects/aca-content/assets/svg/icons/settings.svg
new file mode 100644
index 000000000..42035fd9a
--- /dev/null
+++ b/projects/aca-content/assets/svg/icons/settings.svg
@@ -0,0 +1,3 @@
+
diff --git a/projects/aca-content/assets/svg/icons/workspace.svg b/projects/aca-content/assets/svg/icons/workspace.svg
new file mode 100644
index 000000000..5c63fd78e
--- /dev/null
+++ b/projects/aca-content/assets/svg/icons/workspace.svg
@@ -0,0 +1,4 @@
+
diff --git a/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts b/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts
index 2d545029d..a3dd8d9b7 100755
--- a/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts
+++ b/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts
@@ -29,8 +29,7 @@ import { Store } from '@ngrx/store';
import { AppStore, getSideNavState } from '@alfresco/aca-shared/store';
import { Subject } from 'rxjs';
import { takeUntil, distinctUntilChanged, debounceTime } from 'rxjs/operators';
-import { AppExtensionService } from '@alfresco/aca-shared';
-import { ContentServiceExtensionService } from '../../services/content-service-extension.service';
+import { AppExtensionService, AppService } from '@alfresco/aca-shared';
@Component({
selector: 'app-sidenav',
@@ -47,7 +46,7 @@ export class SidenavComponent implements OnInit, OnDestroy {
groups: Array = [];
private onDestroy$ = new Subject();
- constructor(private store: Store, private extensions: AppExtensionService, private contentServices: ContentServiceExtensionService) {}
+ constructor(private store: Store, private extensions: AppExtensionService, private appServices: AppService) {}
ngOnInit() {
this.store
@@ -56,7 +55,7 @@ export class SidenavComponent implements OnInit, OnDestroy {
.subscribe(() => {
this.groups = this.extensions.getApplicationNavigation(this.extensions.navbar);
});
- this.contentServices.cast.subscribe((data) => (this.hideSidenav = data));
+ this.appServices.cast.subscribe((data) => (this.hideSidenav = data));
}
trackByGroupId(_: number, obj: NavBarGroupRef): string {
@@ -69,7 +68,7 @@ export class SidenavComponent implements OnInit, OnDestroy {
toggleClick() {
this.hideSidenav = !this.hideSidenav;
- this.contentServices.push(this.hideSidenav);
+ this.appServices.getSidenavValue(this.hideSidenav);
}
ngOnDestroy() {
diff --git a/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts b/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts
index c8c68de5a..f69343f81 100644
--- a/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts
+++ b/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts
@@ -11,7 +11,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { throwError } from 'rxjs';
-import { ContentServiceExtensionService } from '../../services/content-service-extension.service';
+import { AppService } from '@alfresco/aca-shared';
@Component({
selector: 'app-view-profile',
@@ -36,7 +36,7 @@ export class ViewProfileComponent implements OnInit {
contactSectionButtonsToggle = true;
hideSidenav: boolean;
- constructor(private router: Router, apiService: AlfrescoApiService, private contentServices: ContentServiceExtensionService) {
+ constructor(private router: Router, apiService: AlfrescoApiService, private appService: AppService) {
this.peopleApi = new PeopleApi(apiService.getInstance());
}
@@ -51,7 +51,7 @@ export class ViewProfileComponent implements OnInit {
.catch((error) => {
throwError(error);
});
- this.contentServices.cast.subscribe((data) => (this.hideSidenav = data));
+ this.appService.cast.subscribe((data) => (this.hideSidenav = data));
}
populateForm(userInfo: Person) {
diff --git a/projects/aca-content/src/lib/services/content-service-extension.service.ts b/projects/aca-content/src/lib/services/content-service-extension.service.ts
index 13cde0e96..bfe7302da 100644
--- a/projects/aca-content/src/lib/services/content-service-extension.service.ts
+++ b/projects/aca-content/src/lib/services/content-service-extension.service.ts
@@ -9,23 +9,16 @@
import { Injectable } from '@angular/core';
import { AppConfigService } from '@alfresco/adf-core';
import { take } from 'rxjs/operators';
-import { BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ContentServiceExtensionService {
- public hideSidenav = new BehaviorSubject(false);
- cast = this.hideSidenav.asObservable();
constructor(private appConfigService: AppConfigService) {
this.updateContentServiceAvailability();
}
- push(str: boolean) {
- this.hideSidenav.next(str);
- }
-
updateContentServiceAvailability() {
this.appConfigService.onLoad.pipe(take(1)).subscribe((config) => {
if (config.plugins && config.plugins.contentService === false) {
diff --git a/projects/aca-shared/src/lib/components/page-layout/page-layout.component.scss b/projects/aca-shared/src/lib/components/page-layout/page-layout.component.scss
index f22493b1e..0f30b0eb4 100644
--- a/projects/aca-shared/src/lib/components/page-layout/page-layout.component.scss
+++ b/projects/aca-shared/src/lib/components/page-layout/page-layout.component.scss
@@ -3,6 +3,15 @@
.aca-page-layout {
@include flex-column;
+ .aca-content-container {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ height: 100%;
+ overflow: hidden;
+ min-height: 0;
+ }
+
.aca-content-header {
border-left: none;
border-right: none;
diff --git a/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts b/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts
index 72508a4b4..d8c9c6b7a 100644
--- a/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts
+++ b/projects/aca-shared/src/lib/components/page-layout/page-layout.component.ts
@@ -24,7 +24,7 @@
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ChangeDetectorRef } from '@angular/core';
-import { ContentServiceExtensionService } from '../../../../../aca-content/src/lib/services/content-service-extension.service';
+import { AppService } from '../../services/app.service';
@Component({
selector: 'aca-page-layout',
@@ -39,18 +39,18 @@ export class PageLayoutComponent {
hasError = false;
hideSidenav: boolean;
- constructor(private contentServices: ContentServiceExtensionService, private ref: ChangeDetectorRef) {
+ constructor(private appService: AppService, private ref: ChangeDetectorRef) {
setInterval(() => {
this.ref.detectChanges();
});
}
ngOnInit() {
- this.contentServices.cast.subscribe((data) => (this.hideSidenav = data));
+ this.appService.cast.subscribe((data) => (this.hideSidenav = data));
}
toggleClick() {
this.hideSidenav = !this.hideSidenav;
- this.contentServices.push(this.hideSidenav);
+ this.appService.getSidenavValue(this.hideSidenav);
}
}
diff --git a/projects/aca-shared/src/lib/services/app.service.ts b/projects/aca-shared/src/lib/services/app.service.ts
index 006003695..67086996a 100644
--- a/projects/aca-shared/src/lib/services/app.service.ts
+++ b/projects/aca-shared/src/lib/services/app.service.ts
@@ -25,7 +25,7 @@
import { Inject, Injectable } from '@angular/core';
import { AuthenticationService, AppConfigService, AlfrescoApiService, PageTitleService, UserPreferencesService } from '@alfresco/adf-core';
-import { Observable, BehaviorSubject } from 'rxjs';
+import { Observable, BehaviorSubject, Subject } from 'rxjs';
import { GroupService, SearchQueryBuilderService, SharedLinksApiService, UploadService, FileUploadErrorEvent } from '@alfresco/adf-content-services';
import { OverlayContainer } from '@angular/cdk/overlay';
import { ActivatedRoute, ActivationEnd, NavigationStart, Router } from '@angular/router';
@@ -58,10 +58,14 @@ export class AppService {
private ready: BehaviorSubject;
ready$: Observable;
+ public hideSidenav = new BehaviorSubject(false);
+ cast = this.hideSidenav.asObservable();
+
pageHeading$: Observable;
hideSidenavConditions = ['/preview/'];
minimizeSidenavConditions = ['search'];
+ onDestroy$ = new Subject();
/**
* Whether `withCredentials` mode is enabled.
@@ -108,6 +112,11 @@ export class AppService {
);
}
+ ngOnDestroy(): void {
+ this.onDestroy$.next(true);
+ this.onDestroy$.complete();
+ }
+
init(): void {
this.alfrescoApiService.getInstance().on('error', (error: { status: number; response: any }) => {
if (error.status === 401 && !this.alfrescoApiService.isExcludedErrorListener(error?.response?.req?.url)) {