mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-08 14:51:14 +00:00
remove old header component
This commit is contained in:
committed by
Sheena Malhotra
parent
50292f5a7e
commit
7920911f80
@@ -1,18 +0,0 @@
|
|||||||
<adf-layout-header
|
|
||||||
[logo]="logo$ | async"
|
|
||||||
[redirectUrl]="landingPage"
|
|
||||||
[tooltip]="appName$ | async"
|
|
||||||
[title]="appName$ | async"
|
|
||||||
(clicked)="onToggleSidenav($event)"
|
|
||||||
[expandedSidenav]="isSidenavExpanded"
|
|
||||||
>
|
|
||||||
<div class="adf-toolbar--spacer adf-toolbar-divider"></div>
|
|
||||||
|
|
||||||
<aca-search-input *ngIf="isContentServiceEnabled()"></aca-search-input>
|
|
||||||
|
|
||||||
<adf-toolbar-divider></adf-toolbar-divider>
|
|
||||||
|
|
||||||
<ng-container *ngFor="let actionRef of actions; trackBy: trackByActionId">
|
|
||||||
<aca-toolbar-action [actionRef]="actionRef"> </aca-toolbar-action>
|
|
||||||
</ng-container>
|
|
||||||
</adf-layout-header>
|
|
@@ -1,95 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Alfresco Example Content Application
|
|
||||||
*
|
|
||||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
||||||
*
|
|
||||||
* This file is part of the Alfresco Example Content Application.
|
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
|
||||||
* the paid license agreement will prevail. Otherwise, the software is
|
|
||||||
* provided under the following open source license terms:
|
|
||||||
*
|
|
||||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Component, ViewEncapsulation, Output, EventEmitter, OnInit, Input, OnDestroy } from '@angular/core';
|
|
||||||
import { Store } from '@ngrx/store';
|
|
||||||
import { Observable, Subject } from 'rxjs';
|
|
||||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
|
||||||
import { AppStore, getAppName, getLogoPath } from '@alfresco/aca-shared/store';
|
|
||||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
|
||||||
import { takeUntil } from 'rxjs/operators';
|
|
||||||
import { AppConfigService, SidenavLayoutComponent } from '@alfresco/adf-core';
|
|
||||||
import { isContentServiceEnabled } from '@alfresco/aca-shared/rules';
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
@Component({
|
|
||||||
selector: 'app-header',
|
|
||||||
templateUrl: './header.component.html',
|
|
||||||
styleUrls: ['./header.component.scss'],
|
|
||||||
encapsulation: ViewEncapsulation.None,
|
|
||||||
host: { class: 'app-header' }
|
|
||||||
})
|
|
||||||
export class AppHeaderComponent implements OnInit, OnDestroy {
|
|
||||||
private onDestroy$: Subject<boolean> = new Subject<boolean>();
|
|
||||||
|
|
||||||
@Output()
|
|
||||||
toggleClicked = new EventEmitter();
|
|
||||||
|
|
||||||
@Input() expandedSidenav = true;
|
|
||||||
|
|
||||||
@Input() data: { layout?: SidenavLayoutComponent; isMenuMinimized?: boolean } = {};
|
|
||||||
|
|
||||||
get isSidenavExpanded(): boolean {
|
|
||||||
return !this.data.isMenuMinimized ?? this.expandedSidenav;
|
|
||||||
}
|
|
||||||
|
|
||||||
appName$: Observable<string>;
|
|
||||||
logo$: Observable<string>;
|
|
||||||
landingPage: string;
|
|
||||||
|
|
||||||
actions: Array<ContentActionRef> = [];
|
|
||||||
|
|
||||||
constructor(public store: Store<AppStore>, private appExtensions: AppExtensionService, private appConfigService: AppConfigService) {
|
|
||||||
this.appName$ = store.select(getAppName);
|
|
||||||
this.logo$ = store.select(getLogoPath);
|
|
||||||
this.landingPage = this.appConfigService.get('landingPage', '/personal-files');
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.appExtensions
|
|
||||||
.getHeaderActions()
|
|
||||||
.pipe(takeUntil(this.onDestroy$))
|
|
||||||
.subscribe((actions) => {
|
|
||||||
this.actions = actions;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onToggleSidenav(_event: boolean): void {
|
|
||||||
this.data.layout.toggleMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
isContentServiceEnabled(): boolean {
|
|
||||||
return isContentServiceEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.onDestroy$.next(true);
|
|
||||||
this.onDestroy$.complete();
|
|
||||||
}
|
|
||||||
|
|
||||||
trackByActionId(_: number, action: ContentActionRef) {
|
|
||||||
return action.id;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,38 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Alfresco Example Content Application
|
|
||||||
*
|
|
||||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
||||||
*
|
|
||||||
* This file is part of the Alfresco Example Content Application.
|
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
|
||||||
* the paid license agreement will prevail. Otherwise, the software is
|
|
||||||
* provided under the following open source license terms:
|
|
||||||
*
|
|
||||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
|
||||||
import { AppHeaderComponent } from './header.component';
|
|
||||||
import { AppSearchInputModule } from '../search/search-input.module';
|
|
||||||
import { AppToolbarModule } from '../toolbar/toolbar.module';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, CoreModule.forChild(), AppSearchInputModule, AppToolbarModule],
|
|
||||||
declarations: [AppHeaderComponent],
|
|
||||||
exports: [AppHeaderComponent]
|
|
||||||
})
|
|
||||||
export class AppHeaderModule {}
|
|
@@ -31,7 +31,6 @@ import { ContentModule } from '@alfresco/adf-content-services';
|
|||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { AppSidenavModule } from '../sidenav/sidenav.module';
|
import { AppSidenavModule } from '../sidenav/sidenav.module';
|
||||||
import { AppCommonModule } from '../common/common.module';
|
import { AppCommonModule } from '../common/common.module';
|
||||||
import { AppHeaderModule } from '../header/header.module';
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { PageLayoutModule } from '@alfresco/aca-shared';
|
import { PageLayoutModule } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
@@ -43,7 +42,6 @@ import { PageLayoutModule } from '@alfresco/aca-shared';
|
|||||||
ContentModule.forChild(),
|
ContentModule.forChild(),
|
||||||
AppCommonModule,
|
AppCommonModule,
|
||||||
AppSidenavModule,
|
AppSidenavModule,
|
||||||
AppHeaderModule,
|
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
PageLayoutModule
|
PageLayoutModule
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user