Merge pull request #1526 from umbraco/feature/workspace-view-collection-kind
Feature: Workspace View Collection Kind
This commit is contained in:
@@ -15,6 +15,11 @@ export interface ManifestWorkspaceView<MetaType extends MetaWorkspaceView = Meta
|
||||
|
||||
export interface MetaWorkspaceView extends MetaManifestWithView {}
|
||||
|
||||
export interface ManifestWorkspaceViewCollectionKind extends ManifestWorkspaceView<MetaWorkspaceView> {
|
||||
type: 'workspaceView';
|
||||
kind: 'collection';
|
||||
}
|
||||
|
||||
export interface ManifestWorkspaceViewContentTypeDesignEditorKind extends ManifestWorkspaceView {
|
||||
type: 'workspaceView';
|
||||
kind: 'contentTypeDesignEditor';
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
import type { ManifestWorkspaceView } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import type { UmbBackofficeManifestKind } from '@umbraco-cms/backoffice/extension-registry';
|
||||
|
||||
export const manifests: Array<ManifestWorkspaceView> = [
|
||||
export const manifests: Array<UmbBackofficeManifestKind> = [
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.Collection',
|
||||
name: 'Workspace Collection View',
|
||||
element: () => import('./workspace-view-collection.element.js'),
|
||||
weight: 300,
|
||||
meta: {
|
||||
label: 'Collection',
|
||||
pathname: 'collection',
|
||||
icon: 'icon-grid',
|
||||
type: 'kind',
|
||||
alias: 'Umb.Kind.WorkspaceView.Collection',
|
||||
matchKind: 'collection',
|
||||
matchType: 'workspaceView',
|
||||
manifest: {
|
||||
type: 'workspaceView',
|
||||
kind: 'collection',
|
||||
element: () => import('./workspace-view-collection.element.js'),
|
||||
weight: 300,
|
||||
meta: {
|
||||
label: 'Collection',
|
||||
pathname: 'collection',
|
||||
icon: 'icon-grid',
|
||||
},
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceAlias',
|
||||
oneOf: ['Umb.Workspace.Document', 'Umb.Workspace.Media'],
|
||||
},
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceHasCollection',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -25,6 +25,26 @@ const workspace: ManifestWorkspaces = {
|
||||
};
|
||||
|
||||
const workspaceViews: Array<ManifestWorkspaceView> = [
|
||||
{
|
||||
type: 'workspaceView',
|
||||
kind: 'collection',
|
||||
alias: 'Umb.WorkspaceView.Document.Collection',
|
||||
name: 'Document Workspace Collection View',
|
||||
meta: {
|
||||
label: 'Collection',
|
||||
pathname: 'collection',
|
||||
icon: 'icon-grid',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceAlias',
|
||||
match: workspace.alias,
|
||||
},
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceHasCollection',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.Document.Edit',
|
||||
|
||||
@@ -17,6 +17,26 @@ const workspace: ManifestWorkspaces = {
|
||||
};
|
||||
|
||||
const workspaceViews: Array<ManifestWorkspaceView> = [
|
||||
{
|
||||
type: 'workspaceView',
|
||||
kind: 'collection',
|
||||
alias: 'Umb.WorkspaceView.Media.Collection',
|
||||
name: 'Media Workspace Collection View',
|
||||
meta: {
|
||||
label: 'Collection',
|
||||
pathname: 'collection',
|
||||
icon: 'icon-grid',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceAlias',
|
||||
match: workspace.alias,
|
||||
},
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceHasCollection',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.Media.Edit',
|
||||
|
||||
Reference in New Issue
Block a user