mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ACS-5761] Demo Shell pages cleanup (#8802)
remove the content that is not covered by e2e testing, preparation steps for the demo shell decommissioning
This commit is contained in:
@@ -1,30 +1,24 @@
|
||||
<adf-sidenav-layout [sidenavMin]="70" [sidenavMax]="220" [stepOver]="780" [hideSidenav]="hideSidenav"
|
||||
[expandedSidenav]="expandedSidenav" (expanded)="setState($event)" [position]="position" data-automation-id="sidenav-layout">
|
||||
<adf-sidenav-layout
|
||||
[sidenavMin]="70"
|
||||
[sidenavMax]="220"
|
||||
[stepOver]="780"
|
||||
data-automation-id="sidenav-layout">
|
||||
|
||||
<adf-sidenav-layout-header>
|
||||
<ng-template let-toggleMenu="toggleMenu" let-isMenuMinimized="isMenuMinimized">
|
||||
|
||||
<ng-template>
|
||||
<adf-layout-header
|
||||
id="adf-header"
|
||||
[title]="title | translate"
|
||||
[redirectUrl]="redirectUrl"
|
||||
[logo]="logo"
|
||||
[tooltip]="tooltip | translate"
|
||||
[showSidenavToggle]="showMenu"
|
||||
[expandedSidenav]="!isMenuMinimized()"
|
||||
[color]="color"
|
||||
[position]="position"
|
||||
(clicked)=toggleMenu($event)>
|
||||
title="ADF Demo Application"
|
||||
redirectUrl="/home"
|
||||
tooltip="ADF Demo Application"
|
||||
[showSidenavToggle]="false">
|
||||
|
||||
<div class="app-layout-menu-spacer"></div>
|
||||
|
||||
<app-search-bar></app-search-bar>
|
||||
|
||||
<div class="app-header-delimiexpandedSidenavter"></div>
|
||||
|
||||
<app-shell-user-info [menuPositionX]="'before'" [menuPositionY]="'above'"></app-shell-user-info>
|
||||
|
||||
<app-theme-picker></app-theme-picker>
|
||||
<button data-automation-id="language-menu-button" mat-icon-button [matMenuTriggerFor]="langMenu">
|
||||
<mat-icon>language</mat-icon>
|
||||
</button>
|
||||
@@ -33,7 +27,6 @@
|
||||
</mat-menu>
|
||||
|
||||
<adf-notification-history menuPositionX="before" menuPositionY="above"></adf-notification-history>
|
||||
|
||||
</adf-layout-header>
|
||||
</ng-template>
|
||||
</adf-sidenav-layout-header>
|
||||
@@ -78,7 +71,6 @@
|
||||
</adf-sidenav-layout-content>
|
||||
|
||||
</adf-sidenav-layout>
|
||||
<app-log></app-log>
|
||||
|
||||
<mat-menu #nestedMenu="matMenu" xPosition="after" class="nestedMenu">
|
||||
<ng-template matMenuContent let-links="links">
|
||||
|
@@ -1,15 +1,3 @@
|
||||
@media screen and (max-width: 599px) {
|
||||
app-search-bar {
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 350px) {
|
||||
app-search-bar {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
adf-file-uploading-dialog {
|
||||
z-index: 1100;
|
||||
}
|
||||
@@ -33,21 +21,11 @@ adf-file-uploading-dialog {
|
||||
}
|
||||
}
|
||||
|
||||
.mat-nav-list .mat-list-item.app-sidenav-link {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
&-menu-spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 959px) {
|
||||
.app-menu {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
mat-sidenav-content > div {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
@@ -56,7 +34,3 @@ mat-sidenav-content > div {
|
||||
flex: auto;
|
||||
}
|
||||
}
|
||||
|
||||
[dir='rtl'] .app-sidenav-link__expand-button {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
|
@@ -15,12 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, OnInit, OnDestroy } from '@angular/core';
|
||||
import { UserPreferencesService, AppConfigService, AlfrescoApiService, UserPreferenceValues } from '@alfresco/adf-core';
|
||||
import { HeaderDataService } from '../header-data/header-data.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
templateUrl: './app-layout.component.html',
|
||||
@@ -28,158 +24,43 @@ import { ThemePalette } from '@angular/material/core';
|
||||
host: { class: 'app-layout' },
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class AppLayoutComponent implements OnInit, OnDestroy {
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
export class AppLayoutComponent {
|
||||
links: Array<any> = [
|
||||
{ href: '/home', icon: 'home', title: 'APP_LAYOUT.HOME' },
|
||||
{ href: '/home', icon: 'home', title: 'Home' },
|
||||
{ href: '/files', icon: 'folder_open', title: 'Content Services' },
|
||||
{ href: '/card-view', icon: 'view_headline', title: 'CardView' },
|
||||
{ href: '/task-list', icon: 'assignment', title: 'Task List' },
|
||||
{
|
||||
href: '/extensions', icon: 'extension', title: 'Extensions', children: [
|
||||
{ href: '/extensions/document-list/presets', icon: 'extension', title: 'Document List' }
|
||||
href: '/cloud', icon: 'cloud', title: 'Process Cloud', children: [
|
||||
{ href: '/cloud/', icon: 'cloud', title: 'Home' },
|
||||
{ href: '/cloud/community', icon: 'cloud', title: 'Community' },
|
||||
{ href: '/form-cloud', icon: 'poll', title: 'Form' },
|
||||
{ href: '/cloud/people-group-cloud', icon: 'group', title: 'People/Group Cloud' },
|
||||
{ href: '/cloud/task-header-cloud', icon: 'cloud', title: 'Task Header Cloud' },
|
||||
{ href: '/cloud/service-task-list', icon: 'cloud', title: 'Service Task List' }
|
||||
]
|
||||
},
|
||||
{ href: '/files', icon: 'folder_open', title: 'APP_LAYOUT.CONTENT_SERVICES' },
|
||||
{ href: '/filtered-search', icon: 'rowing', title: 'APP_LAYOUT.FILTERED_SEARCH' },
|
||||
{ href: '/breadcrumb', icon: 'label', title: 'APP_LAYOUT.BREADCRUMB' },
|
||||
{ href: '/notifications', icon: 'alarm', title: 'APP_LAYOUT.NOTIFICATIONS' },
|
||||
{ href: '/card-view', icon: 'view_headline', title: 'APP_LAYOUT.CARD_VIEW' },
|
||||
{ href: '/confirm-dialog', icon: 'view_headline', title: 'APP_LAYOUT.CONFIRM-DIALOG' },
|
||||
{ href: '/header-data', icon: 'edit', title: 'APP_LAYOUT.HEADER_DATA' },
|
||||
{ href: '/node-selector', icon: 'attachment', title: 'APP_LAYOUT.NODE-SELECTOR' },
|
||||
{ href: '/sites', icon: 'format_list_bulleted', title: 'APP_LAYOUT.SITES' },
|
||||
{ href: '/task-list', icon: 'assignment', title: 'APP_LAYOUT.TASK_LIST' },
|
||||
{
|
||||
href: '/cloud', icon: 'cloud', title: 'APP_LAYOUT.PROCESS_CLOUD', children: [
|
||||
{ href: '/cloud/', icon: 'cloud', title: 'APP_LAYOUT.HOME' },
|
||||
{ href: '/cloud/community', icon: 'cloud', title: 'APP_LAYOUT.COMMUNITY' },
|
||||
{ href: '/form-cloud', icon: 'poll', title: 'APP_LAYOUT.FORM' },
|
||||
{ href: '/cloud/people-group-cloud', icon: 'group', title: 'APP_LAYOUT.PEOPLE_GROUPS_CLOUD' },
|
||||
{ href: '/cloud/task-header-cloud', icon: 'cloud', title: 'APP_LAYOUT.TASK_HEADER_CLOUD.COMPONENT_NAME' },
|
||||
{ href: '/cloud/service-task-list', icon: 'cloud', title: 'APP_LAYOUT.SERVICE_TASK_LIST' }
|
||||
]
|
||||
},
|
||||
{ href: '/activiti', icon: 'device_hub', title: 'APP_LAYOUT.PROCESS_SERVICES', children: [
|
||||
{ href: '/activiti', icon: 'vpn_key', title: 'APP_LAYOUT.APP' },
|
||||
{ href: '/process-list', icon: 'assignment', title: 'APP_LAYOUT.PROCESS_LIST' },
|
||||
{ href: '/form', icon: 'poll', title: 'APP_LAYOUT.FORM' },
|
||||
{ href: '/form-list', icon: 'library_books', title: 'APP_LAYOUT.FORM_LIST' },
|
||||
{ href: '/form-loading', icon: 'cached', title: 'APP_LAYOUT.FORM_LOADING' }
|
||||
{ href: '/activiti', icon: 'device_hub', title: 'Process Services', children: [
|
||||
{ href: '/activiti', icon: 'vpn_key', title: 'App' },
|
||||
{ href: '/process-list', icon: 'assignment', title: 'Process List' },
|
||||
{ href: '/form', icon: 'poll', title: 'Form' },
|
||||
{ href: '/form-list', icon: 'library_books', title: 'Form List' },
|
||||
{ href: '/form-loading', icon: 'cached', title: 'Form Loading' }
|
||||
]},
|
||||
{ href: '/login', icon: 'vpn_key', title: 'APP_LAYOUT.LOGIN' },
|
||||
{ href: '/trashcan', icon: 'delete', title: 'APP_LAYOUT.TRASHCAN' },
|
||||
{ href: '/dl-custom-sources', icon: 'extension', title: 'APP_LAYOUT.CUSTOM_SOURCES' },
|
||||
{ href: '/datatable', icon: 'view_module', title: 'APP_LAYOUT.DATATABLE', children: [
|
||||
{ href: '/datatable', icon: 'view_module', title: 'APP_LAYOUT.DATATABLE' },
|
||||
{ href: '/datatable-lazy', icon: 'view_module', title: 'APP_LAYOUT.DATATABLE_LAZY' },
|
||||
{ href: '/datatable/dnd', icon: 'view_module', title: 'Drag and Drop' },
|
||||
{ href: '/copy-content', icon: 'view_module', title: 'Copy Content' }
|
||||
]},
|
||||
{ href: '/rich-text-editor', icon: 'list_alt', title: 'APP_LAYOUT.RICH_TEXT_EDITOR' },
|
||||
{ href: '/template-list', icon: 'list_alt', title: 'APP_LAYOUT.TEMPLATE' },
|
||||
{ href: '/webscript', icon: 'extension', title: 'APP_LAYOUT.WEBSCRIPT' },
|
||||
{ href: '/tag', icon: 'local_offer', title: 'APP_LAYOUT.TAG' },
|
||||
{ href: '/social', icon: 'thumb_up', title: 'APP_LAYOUT.SOCIAL' },
|
||||
{ href: '/pipes', icon: 'layers', title: 'APP_LAYOUT.PIPES' },
|
||||
{ href: '/settings-layout', icon: 'settings', title: 'APP_LAYOUT.SETTINGS' },
|
||||
{ href: '/config-editor', icon: 'code', title: 'APP_LAYOUT.CONFIG-EDITOR' },
|
||||
{ href: '/extendedSearch', icon: 'search', title: 'APP_LAYOUT.SEARCH' },
|
||||
/* cspell:disable-next-line */
|
||||
{ href: '/overlay-viewer', icon: 'pageview', title: 'APP_LAYOUT.OVERLAY_VIEWER' },
|
||||
{ href: '/treeview', icon: 'nature', title: 'APP_LAYOUT.TREE_VIEW' },
|
||||
{ href: '/expandable-list', icon: 'hot_tub', title: 'APP_LAYOUT.EXPAND_LIST' },
|
||||
{ href: '/icons', icon: 'tag_faces', title: 'APP_LAYOUT.ICONS' },
|
||||
{ href: '/about', icon: 'info_outline', title: 'APP_LAYOUT.ABOUT' }
|
||||
{ href: '/login', icon: 'vpn_key', title: 'Login' },
|
||||
{ href: '/trashcan', icon: 'delete', title: 'Trashcan' },
|
||||
{ href: '/dl-custom-sources', icon: 'extension', title: 'Custom Sources' },
|
||||
{ href: '/settings-layout', icon: 'settings', title: 'Settings' },
|
||||
{ href: '/config-editor', icon: 'code', title: 'Configuration Editor' },
|
||||
{ href: '/treeview', icon: 'nature', title: 'Tree View' },
|
||||
{ href: '/about', icon: 'info_outline', title: 'About' }
|
||||
];
|
||||
|
||||
expandedSidenav = false;
|
||||
|
||||
position: 'start' | 'end' = 'start';
|
||||
direction = 'ltr';
|
||||
|
||||
hideSidenav = false;
|
||||
showMenu = true;
|
||||
|
||||
enableRedirect = true;
|
||||
color: ThemePalette = 'primary';
|
||||
title = 'APP_LAYOUT.APP_NAME';
|
||||
logo: string;
|
||||
redirectUrl: string | any[] = ['/home'];
|
||||
tooltip = 'APP_LAYOUT.APP_NAME';
|
||||
|
||||
ngOnInit() {
|
||||
const expand = this.config.get<boolean>('sideNav.expandedSidenav');
|
||||
const preserveState = this.config.get('sideNav.preserveState');
|
||||
|
||||
if (preserveState && expand) {
|
||||
this.expandedSidenav = (this.userPreferences.get('expandedSidenav', expand.toString()) === 'true');
|
||||
} else if (expand) {
|
||||
this.expandedSidenav = expand;
|
||||
}
|
||||
|
||||
this.headerService.hideMenu
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(show => this.showMenu = show);
|
||||
|
||||
this.headerService.color
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(color => {
|
||||
if (['primary', 'accent', 'warn'].includes(color)) {
|
||||
this.color = color;
|
||||
} else {
|
||||
this.color = undefined;
|
||||
document.documentElement.style.setProperty('--theme-primary-color', color);
|
||||
}
|
||||
});
|
||||
|
||||
this.headerService.title
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(title => this.title = title);
|
||||
|
||||
this.headerService.headerTextColor
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(headerTextColor => {
|
||||
document.documentElement.style.setProperty('--theme-header-text-color', headerTextColor);
|
||||
});
|
||||
|
||||
this.headerService.logo
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(path => this.logo = path);
|
||||
|
||||
this.headerService.redirectUrl
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(redirectUrl => this.redirectUrl = redirectUrl);
|
||||
|
||||
this.headerService.tooltip
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(tooltip => this.tooltip = tooltip);
|
||||
|
||||
this.headerService.position
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(position => this.position = position);
|
||||
|
||||
this.headerService.hideSidenav
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(hideSidenav => this.hideSidenav = hideSidenav);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
constructor(
|
||||
private userPreferences: UserPreferencesService,
|
||||
private config: AppConfigService,
|
||||
private alfrescoApiService: AlfrescoApiService,
|
||||
private headerService: HeaderDataService) {
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
if (this.alfrescoApiService.getInstance().isOauthConfiguration()) {
|
||||
this.enableRedirect = false;
|
||||
}
|
||||
}
|
||||
|
||||
setState(state) {
|
||||
if (this.config.get('sideNav.preserveState')) {
|
||||
this.userPreferences.set(UserPreferenceValues.ExpandedSideNavStatus, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user