mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1442] improved notifications and delete/restore (#393)
* remove notifications from files component * remove notifications from favorites page * remove irrelevant tests * snackbar effects * snackbar theme * improve permanent delete messaging * cleanup tests * strongly typed node delete directive, node actions * strongly-typed directives * test fixes * redux dev tools, migrate permanent delete directive * reload trashcan on service events * delete and restore nodes, snackbar effects with undo * wire viewer with store and effects * test fixes * migrate events * fix spelling * bug fixes * use notification effects on restore node * remove fdescribe * node-versions using snackbar actions * dispatch snackbars from node-move directive * store-enabled create folder * reduce dependency on ContentService for list reloads * favorites use unified preview api for files * simplify preview for shared files * remove test
This commit is contained in:
@@ -25,8 +25,7 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||
|
||||
import { ContentManagementService } from '../../common/services/content-management.service';
|
||||
import { NodePermissionService } from '../../common/services/node-permission.service';
|
||||
@@ -43,7 +42,6 @@ export class SharedFilesComponent extends PageComponent implements OnInit {
|
||||
route: ActivatedRoute,
|
||||
store: Store<AppStore>,
|
||||
private content: ContentManagementService,
|
||||
private apiService: AlfrescoApiService,
|
||||
public permission: NodePermissionService,
|
||||
preferences: UserPreferencesService) {
|
||||
super(preferences, router, route, store);
|
||||
@@ -53,21 +51,15 @@ export class SharedFilesComponent extends PageComponent implements OnInit {
|
||||
super.ngOnInit();
|
||||
|
||||
this.subscriptions = this.subscriptions.concat([
|
||||
this.content.nodeDeleted.subscribe(() => this.reload()),
|
||||
this.content.nodeMoved.subscribe(() => this.reload()),
|
||||
this.content.nodeRestored.subscribe(() => this.reload())
|
||||
this.content.nodesDeleted.subscribe(() => this.reload()),
|
||||
this.content.nodesMoved.subscribe(() => this.reload()),
|
||||
this.content.nodesRestored.subscribe(() => this.reload())
|
||||
]);
|
||||
}
|
||||
|
||||
onNodeDoubleClick(link: { nodeId?: string }) {
|
||||
if (link && link.nodeId) {
|
||||
this.apiService.nodesApi.getNode(link.nodeId).then(
|
||||
(node: MinimalNodeEntity) => {
|
||||
if (node && node.entry && node.entry.isFile) {
|
||||
this.router.navigate(['./preview', node.entry.id], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
);
|
||||
this.router.navigate(['./preview', link.nodeId], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user