filter on conditions
This commit is contained in:
@@ -6,12 +6,16 @@ import type { ClassConstructor } from '@umbraco-cms/models';
|
||||
export interface ManifestWorkspaceAction extends ManifestElement {
|
||||
type: 'workspaceAction';
|
||||
meta: MetaWorkspaceAction;
|
||||
conditions: ConditionsWorkspaceAction;
|
||||
}
|
||||
|
||||
export interface MetaWorkspaceAction {
|
||||
workspaces: Array<string>;
|
||||
label?: string; //TODO: Use or implement additional label-key
|
||||
look?: InterfaceLook;
|
||||
color?: InterfaceColor;
|
||||
api: ClassConstructor<UmbWorkspaceAction>;
|
||||
}
|
||||
|
||||
export interface ConditionsWorkspaceAction {
|
||||
workspaces: Array<string>;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export class UmbWorkspaceFooterLayout extends UmbLitElement {
|
||||
<umb-extension-slot
|
||||
slot="actions"
|
||||
type="workspaceAction"
|
||||
.filter=${(extension: ManifestWorkspaceAction) => extension.meta.workspaces.includes(this.alias)}
|
||||
.filter=${(extension: ManifestWorkspaceAction) => extension.conditions.workspaces.includes(this.alias)}
|
||||
default-element="umb-workspace-action"></umb-extension-slot>
|
||||
<slot name="actions" slot="actions"></slot>
|
||||
</umb-footer-layout>
|
||||
|
||||
Reference in New Issue
Block a user