mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-2087] Overlay Viewer (#1175)
* viewer outlet over preview route * use ViewNodeAction over ViewFileAction * pass data to dynamic component * ViewNodeComponent for view file custom actions * update docs * pass primary url to show preview outlet * update tests * reset selection on navigation event * document list update selection action when not viewer * close viewer for move and delete from viewer * location as router commands to work with search query * make viewer to behave like former preview * viewer error route * call correct preview method * remove view/error route * navigate to show error * span element for action name * fix folder navigation * fix test * page title fix * update tests * locate better the viewer toolbar * fix viewer url link * update navigation rules * document-list directive tests * try workaround for chrome 76 * try another workaround for using chromedriver 75 instead of 76 * ViewerEffects tests * reset selection over reload * fix tests * add reset event test * remove actions * context menu action refresh on favourite * reset selection on navigation * add delete and upload events * takeUntil after operators * remove chrome workaround parameter * filter navigation event
This commit is contained in:
committed by
Suzana Dirla
parent
8643a8806d
commit
e31c0d6caf
+12
-13
@@ -33,7 +33,7 @@ import {
|
||||
SharedLinksApiService
|
||||
} from '@alfresco/adf-core';
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router, ActivationEnd } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppExtensionService } from './extensions/extension.service';
|
||||
import {
|
||||
@@ -97,22 +97,21 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.loadAppSettings();
|
||||
|
||||
const { router, pageTitle, route } = this;
|
||||
const { router, pageTitle } = this;
|
||||
|
||||
router.events
|
||||
.pipe(filter(event => event instanceof NavigationEnd))
|
||||
.subscribe(() => {
|
||||
let currentRoute = route.root;
|
||||
|
||||
while (currentRoute.firstChild) {
|
||||
currentRoute = currentRoute.firstChild;
|
||||
}
|
||||
|
||||
const snapshot: any = currentRoute.snapshot || {};
|
||||
this.router.events
|
||||
.pipe(
|
||||
filter(
|
||||
event =>
|
||||
event instanceof ActivationEnd &&
|
||||
event.snapshot.children.length === 0
|
||||
)
|
||||
)
|
||||
.subscribe((event: ActivationEnd) => {
|
||||
const snapshot: any = event.snapshot || {};
|
||||
const data: any = snapshot.data || {};
|
||||
|
||||
pageTitle.setTitle(data.title || '');
|
||||
|
||||
this.store.dispatch(new SetCurrentUrlAction(router.url));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user