|
|
|
@ -192,6 +192,8 @@ export class AppComponent implements OnInit {
|
|
|
|
|
const id = node.data.id;
|
|
|
|
|
const nodeId = node.data.node_id;
|
|
|
|
|
if ( !node.data.virtual ) {
|
|
|
|
|
debug('Navigating editor to node:', {id, nodeId});
|
|
|
|
|
|
|
|
|
|
this.currentPageId = id;
|
|
|
|
|
this.router.navigate(['/editor', { id, ...(nodeId ? { node_id: nodeId } : {}) }]);
|
|
|
|
|
}
|
|
|
|
@ -608,6 +610,12 @@ export class AppComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.navService.navigationRequest$.subscribe(pageId => {
|
|
|
|
|
debug('Page navigation request: ', {pageId});
|
|
|
|
|
if ( !pageId ) {
|
|
|
|
|
debug('Empty page ID. Will not navigate.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.currentPageId = pageId;
|
|
|
|
|
this.router.navigate(['/editor', { id: pageId }]);
|
|
|
|
|
});
|
|
|
|
|