[develop | DONE | FIXED]: Fix sidebar in customization page.

This commit is contained in:
Konstantinos Triantafyllou 2023-11-03 16:53:39 +02:00
parent 66a0b038b6
commit bc201a1ae8
7 changed files with 127 additions and 120 deletions

View File

@ -5,9 +5,9 @@
<div id="modal-container"></div>
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user"></navbar>
<div class="sidebar_main_swipe uk-flex" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar"
<div class="sidebar_main_swipe uk-flex" [class.sidebar_main_active]="open && (hasSidebar || hasInternalSidebar)" [class.sidebar_mini]="!open && (hasSidebar || hasInternalSidebar)"
[class.sidebar_hover]="hover">
<dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
<dashboard-sidebar *ngIf="hasSidebar && !hasInternalSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
<main class="uk-width-1-1">
<router-outlet></router-outlet>
</main>

View File

@ -28,6 +28,7 @@ export class AppComponent implements OnInit {
params: BehaviorSubject<Params> = new BehaviorSubject<Params>(null);
data: BehaviorSubject<Data> = new BehaviorSubject<Data>(null);
hasSidebar: boolean = false;
hasInternalSidebar: boolean = false;
hasHeader: boolean = true;
hasAdminMenu: boolean = false;
isFrontPage: boolean = false;
@ -81,6 +82,10 @@ export class AppComponent implements OnInit {
this.hasSidebar = hasSidebar;
this.cdr.detectChanges();
}));
this.subscriptions.push(this.layoutService.hasInternalSidebar.subscribe(hasInternalSidebar => {
this.hasInternalSidebar = hasInternalSidebar;
this.cdr.detectChanges();
}));
this.subscriptions.push(this.layoutService.hasHeader.subscribe(hasHeader => {
this.hasHeader = hasHeader;
this.cdr.detectChanges();

@ -1 +1 @@
Subproject commit 3e656de39ca585a307b558e46c26de61afc35b96
Subproject commit 06a2ae16ee5576fec34cc1afad614eff45dc715d

View File

@ -31,7 +31,7 @@ import {ConnectRIGuard} from "../openaireLibrary/connect/communityGuard/connectR
{
path: 'customize-layout',
loadChildren: () => import('./customization/customization.module').then(m => m.CustomizationModule),
data: {hasSidebar: true, hasHeader: false}
data: {hasInternalSidebar: true, hasHeader: false}
},
{
path: 'user-info',

View File

@ -1,5 +1,6 @@
<aside *ngIf="draftCustomizationOptions" id="sidebar_main">
<div id="sidebar_content">
<div *ngIf="draftCustomizationOptions" class="uk-flex">
<aside id="sidebar_main" class="uk-sticky" uk-sticky="start: 0; end: .sidebar_main_swipe">
<div sidebar-content>
<div class="back">
<a (click)="close()" class="uk-flex uk-flex-middle uk-flex-center">
<div class="uk-width-auto">
@ -43,10 +44,9 @@
*ngTemplateOutlet="buttonOptions ; context: { }"></ng-container>
</ng-container>
</div>
</div>
</aside>
<div *ngIf="draftCustomizationOptions" page-content>
</aside>
<div page-content class="uk-width-1-1">
<div actions>
<div class="uk-section-small">
<ng-container *ngTemplateOutlet="applyResetButtons;"></ng-container>
@ -135,7 +135,9 @@
</div>
</div>
</div>
</div>
</div>
<ng-template #identityOptions>
<div class="functionalities-container uk-text-small">
<div class="uk-margin-top">

@ -1 +1 @@
Subproject commit d1b2d5e585722751792d12645d17f820cd6a7860
Subproject commit 6bb1e61b059bef1bff3bfb0611b0df46f7840426

@ -1 +1 @@
Subproject commit 2dadcf85926bc0f11fff22ed94dc197ddd8587c6
Subproject commit 5e8c1addb1ebfa508aac8cb9540a755940c95b79