mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
Fix create menu and viewer evaluators not in sync with store values (#1634)
This commit is contained in:
@@ -40,6 +40,7 @@ import { Subject } from 'rxjs';
|
|||||||
export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
|
export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
|
||||||
@Input()
|
@Input()
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
node: MinimalNodeEntity;
|
node: MinimalNodeEntity;
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
import { Component, Input, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
|
import { Component, Input, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
|
||||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||||
import { AppStore, getCurrentFolder } from '@alfresco/aca-shared/store';
|
import { AppStore, getRuleContext } from '@alfresco/aca-shared/store';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
@@ -52,7 +52,7 @@ export class CreateMenuComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.store
|
this.store
|
||||||
.select(getCurrentFolder)
|
.select(getRuleContext)
|
||||||
.pipe(takeUntil(this.onDestroy$))
|
.pipe(takeUntil(this.onDestroy$))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
this.createActions = this.extensions.getCreateActions();
|
this.createActions = this.extensions.getCreateActions();
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
|
import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
|
||||||
import {
|
import {
|
||||||
AppStore,
|
AppStore,
|
||||||
getAppSelection,
|
getRuleContext,
|
||||||
isInfoDrawerOpened,
|
isInfoDrawerOpened,
|
||||||
SetSelectedNodesAction,
|
SetSelectedNodesAction,
|
||||||
ClosePreviewAction,
|
ClosePreviewAction,
|
||||||
@@ -125,10 +125,10 @@ export class AppViewerComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.store
|
this.store
|
||||||
.select(getAppSelection)
|
.select(getRuleContext)
|
||||||
.pipe(takeUntil(this.onDestroy$))
|
.pipe(takeUntil(this.onDestroy$))
|
||||||
.subscribe((selection) => {
|
.subscribe((ruleContext) => {
|
||||||
this.selection = selection;
|
this.selection = ruleContext.selection;
|
||||||
|
|
||||||
this.toolbarActions = this.extensions.getViewerToolbarActions();
|
this.toolbarActions = this.extensions.getViewerToolbarActions();
|
||||||
this.openWith = this.extensions.openWithActions;
|
this.openWith = this.extensions.openWithActions;
|
||||||
|
Reference in New Issue
Block a user