mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
Protractor cleanup for demo shell (#9019)
* [ci:force] cleanup protractor tests * [ci:force] cleanup insights test * [ci:force] cleanup dead demo shell e2e * [ci:force] cleanup e2e * [ci:force] cleanup e2e * cleanup files component * [ci:force] cleanup e2e * [ci:force] remove user info SSO protractor e2e * [ci:force] remove viewer e2e already covered by other tests * [ci:force] remove custom font from demo shell * [ci:force] demo shell viewer cleanup * [ci:force] cleanup viewer in demo shell * [ci:force] rollback model changes * [ci:force] remove site picker from content demo * [ci:force] cleanup files demo shell component * [ci:force] cleanup e2e and dead code * [ci:force] cleanup dead code * [ci:force] fix linting * [ci:force] standalone home component * [ci:force] cleanup demo shell app layout * [ci:force] cleanup css * [ci:force] cleanup demo shell logout * Update demo-shell/src/app/components/app-layout/app-layout.component.html Co-authored-by: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com> --------- Co-authored-by: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com>
This commit is contained in:
@@ -17,26 +17,16 @@
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute, Router, PRIMARY_OUTLET } from '@angular/router';
|
||||
import {
|
||||
NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
ContentService,
|
||||
AllowableOperationsEnum,
|
||||
PermissionsEnum,
|
||||
NodesApiService,
|
||||
FileUploadErrorEvent
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { NotificationService } from '@alfresco/adf-core';
|
||||
import { ContentService, AllowableOperationsEnum, PermissionsEnum, NodesApiService, FileUploadErrorEvent } from '@alfresco/adf-content-services';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-file-view',
|
||||
templateUrl: './file-view.component.html',
|
||||
styleUrls: ['./file-view.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FileViewComponent implements OnInit {
|
||||
|
||||
nodeId: string = null;
|
||||
versionId: string = null;
|
||||
displayEmptyMetadata = false;
|
||||
@@ -46,36 +36,21 @@ export class FileViewComponent implements OnInit {
|
||||
isPreset = false;
|
||||
customPreset: string = null;
|
||||
displayDefaultProperties = true;
|
||||
showToolbar = true;
|
||||
urlFile = null;
|
||||
allowGoBack = true;
|
||||
openWith = false;
|
||||
allowDownload = true;
|
||||
allowPrint = true;
|
||||
allowRightSidebar = true;
|
||||
allowLeftSidebar = true;
|
||||
moreActions = true;
|
||||
moreActionsMenu = false;
|
||||
fileUrlSwitch = false;
|
||||
showLeftSidebar = null;
|
||||
showRightSidebar = false;
|
||||
customToolbar = false;
|
||||
isCommentEnabled = false;
|
||||
showTabWithIcon = false;
|
||||
showTabWithIconAndLabel = false;
|
||||
desiredAspect: string = null;
|
||||
showAspect: string = null;
|
||||
name: string;
|
||||
fileName: string;
|
||||
blobFile: Blob;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private nodeApiService: NodesApiService,
|
||||
private contentServices: ContentService,
|
||||
private preview: PreviewService,
|
||||
private notificationService: NotificationService) {
|
||||
}
|
||||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private nodeApiService: NodesApiService,
|
||||
private contentServices: ContentService,
|
||||
private preview: PreviewService,
|
||||
private notificationService: NotificationService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe((params) => {
|
||||
@@ -85,7 +60,8 @@ export class FileViewComponent implements OnInit {
|
||||
this.nodeApiService.getNode(id).subscribe(
|
||||
(node) => {
|
||||
if (node?.isFile) {
|
||||
this.isCommentEnabled = this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
|
||||
this.isCommentEnabled =
|
||||
this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
|
||||
this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
|
||||
this.nodeId = id;
|
||||
return;
|
||||
@@ -131,66 +107,6 @@ export class FileViewComponent implements OnInit {
|
||||
this.displayDefaultProperties = !this.displayDefaultProperties;
|
||||
}
|
||||
|
||||
toggleShowToolbar() {
|
||||
this.showToolbar = !this.showToolbar;
|
||||
}
|
||||
|
||||
toggleAllowGoBack() {
|
||||
this.allowGoBack = !this.allowGoBack;
|
||||
}
|
||||
|
||||
toggleOpenWith() {
|
||||
this.openWith = !this.openWith;
|
||||
}
|
||||
|
||||
toggleAllowDownload() {
|
||||
this.allowDownload = !this.allowDownload;
|
||||
}
|
||||
|
||||
toggleAllowPrint() {
|
||||
this.allowPrint = !this.allowPrint;
|
||||
}
|
||||
|
||||
toggleOpenMoreActions() {
|
||||
this.moreActions = !this.moreActions;
|
||||
}
|
||||
|
||||
toggleMoreActionsMenu() {
|
||||
this.moreActionsMenu = !this.moreActionsMenu;
|
||||
}
|
||||
|
||||
toggleShowRightSidebar() {
|
||||
this.showRightSidebar = !this.showRightSidebar;
|
||||
}
|
||||
|
||||
hideLeftSidebar() {
|
||||
this.showLeftSidebar = false;
|
||||
}
|
||||
|
||||
toggleAllowRightSidebar() {
|
||||
this.allowRightSidebar = !this.allowRightSidebar;
|
||||
}
|
||||
|
||||
toggleAllowLeftSidebar() {
|
||||
this.allowLeftSidebar = !this.allowLeftSidebar;
|
||||
}
|
||||
|
||||
toggleShowTabWithIcon() {
|
||||
this.showTabWithIcon = !this.showTabWithIcon;
|
||||
}
|
||||
|
||||
toggleShowTabWithIconAndLabel() {
|
||||
this.showTabWithIconAndLabel = !this.showTabWithIconAndLabel;
|
||||
}
|
||||
|
||||
toggleFileUrl() {
|
||||
this.fileUrlSwitch = !this.fileUrlSwitch;
|
||||
|
||||
if (!this.fileUrlSwitch) {
|
||||
this.urlFile = null;
|
||||
}
|
||||
}
|
||||
|
||||
togglePreset() {
|
||||
this.isPreset = !this.isPreset;
|
||||
if (!this.isPreset) {
|
||||
@@ -198,10 +114,6 @@ export class FileViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
toggleToolbar() {
|
||||
this.customToolbar = !this.customToolbar;
|
||||
}
|
||||
|
||||
applyCustomPreset() {
|
||||
this.isPreset = false;
|
||||
setTimeout(() => {
|
||||
|
Reference in New Issue
Block a user