mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-805] about screen enhancements (#813)
* upgrade to latest adf-extensions * switch to ADF RepositoryState * show extensions on About page, i18n fixes * update docs * cleanup about styles * greatly simplify app dependencies rendering * fix linting * fix tests
This commit is contained in:
committed by
Cilibiu Bogdan
parent
01ea887d5d
commit
26b4b0684f
@@ -26,7 +26,7 @@
|
||||
import { Injectable, Type } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Route } from '@angular/router';
|
||||
import { AppStore, RepositoryState } from '../store/states';
|
||||
import { AppStore } from '../store/states';
|
||||
import { ruleContext } from '../store/selectors/app.selectors';
|
||||
import { NodePermissionService } from '../services/node-permission.service';
|
||||
import {
|
||||
@@ -46,15 +46,20 @@ import {
|
||||
reduceEmptyMenus,
|
||||
ExtensionService,
|
||||
ProfileState,
|
||||
mergeObjects
|
||||
mergeObjects,
|
||||
RepositoryState,
|
||||
ExtensionRef
|
||||
} from '@alfresco/adf-extensions';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { DocumentListPresetRef } from './document-list.extensions';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppExtensionService implements RuleContext {
|
||||
private _references = new BehaviorSubject<ExtensionRef[]>([]);
|
||||
|
||||
defaults = {
|
||||
layout: 'app.layout.main',
|
||||
auth: ['app.auth']
|
||||
@@ -97,6 +102,8 @@ export class AppExtensionService implements RuleContext {
|
||||
profile: ProfileState;
|
||||
repository: RepositoryState;
|
||||
|
||||
references$: Observable<ExtensionRef[]>;
|
||||
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private loader: ExtensionLoaderService,
|
||||
@@ -104,6 +111,8 @@ export class AppExtensionService implements RuleContext {
|
||||
public permissions: NodePermissionService,
|
||||
private appConfig: AppConfigService
|
||||
) {
|
||||
this.references$ = this._references.asObservable();
|
||||
|
||||
this.store.select(ruleContext).subscribe(result => {
|
||||
this.selection = result.selection;
|
||||
this.navigation = result.navigation;
|
||||
@@ -174,6 +183,11 @@ export class AppExtensionService implements RuleContext {
|
||||
trashcan: this.getDocumentListPreset(config, 'trashcan'),
|
||||
searchLibraries: this.getDocumentListPreset(config, 'search-libraries')
|
||||
};
|
||||
|
||||
const references = (config.$references || [])
|
||||
.filter(entry => typeof entry === 'object')
|
||||
.map(entry => <ExtensionRef>entry);
|
||||
this._references.next(references);
|
||||
}
|
||||
|
||||
protected loadNavBar(config: ExtensionConfig): Array<NavBarGroupRef> {
|
||||
|
Reference in New Issue
Block a user