mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2745] Viewer - return to location on close (#1196)
* use viewNodeExtras when calling action * open viewer based on ViewNodeExtras data * resolve closing destination based on ViewNodeExtras query params * remove unused param * call ViewNodeAction with correct params * update tests * update docs
This commit is contained in:
@@ -33,6 +33,11 @@ export enum ViewerActionTypes {
|
||||
ClosePreview = 'CLOSE_PREVIEW'
|
||||
}
|
||||
|
||||
export interface ViewNodeExtras {
|
||||
location?: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export class ViewFileAction implements Action {
|
||||
readonly type = ViewerActionTypes.ViewFile;
|
||||
|
||||
@@ -42,7 +47,7 @@ export class ViewFileAction implements Action {
|
||||
export class ViewNodeAction implements Action {
|
||||
readonly type = ViewerActionTypes.ViewNode;
|
||||
|
||||
constructor(public nodeId: string, public location?: string) {}
|
||||
constructor(public nodeId: string, public viewNodeExtras?: ViewNodeExtras) {}
|
||||
}
|
||||
|
||||
export class FullscreenViewerAction implements Action {
|
||||
|
Reference in New Issue
Block a user