mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1809] app header extensions (#659)
* move header to separate component * code fixes * project header buttons and menus * app menu example * delete empty style * logout action * update docs * and one more test
This commit is contained in:
@@ -58,6 +58,7 @@ export class AppExtensionService implements RuleContext {
|
||||
auth: ['app.auth']
|
||||
};
|
||||
|
||||
headerActions: Array<ContentActionRef> = [];
|
||||
toolbarActions: Array<ContentActionRef> = [];
|
||||
viewerToolbarActions: Array<ContentActionRef> = [];
|
||||
viewerToolbarMoreActions: Array<ContentActionRef> = [];
|
||||
@@ -95,7 +96,10 @@ export class AppExtensionService implements RuleContext {
|
||||
console.error('Extension configuration not found');
|
||||
return;
|
||||
}
|
||||
|
||||
this.headerActions = this.loader.getContentActions(
|
||||
config,
|
||||
'features.header'
|
||||
);
|
||||
this.toolbarActions = this.loader.getContentActions(
|
||||
config,
|
||||
'features.toolbar'
|
||||
@@ -233,6 +237,10 @@ export class AppExtensionService implements RuleContext {
|
||||
);
|
||||
}
|
||||
|
||||
getHeaderActions(): Array<ContentActionRef> {
|
||||
return this.headerActions.filter(action => this.filterByRules(action));
|
||||
}
|
||||
|
||||
getViewerToolbarMoreActions(): Array<ContentActionRef> {
|
||||
return this.viewerToolbarMoreActions.filter(action =>
|
||||
this.filterByRules(action)
|
||||
|
Reference in New Issue
Block a user