From 158f79bf5a24e6d4a72f704ee6aa352f1b6cf548 Mon Sep 17 00:00:00 2001 From: Lone Iversen <108085781+loivsen@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:44:30 +0100 Subject: [PATCH] dictionary menu --- .../dictionary/dictionary/entity-actions/manifests.ts | 8 ++++---- .../src/packages/dictionary/section.manifest.ts | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/dictionary/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/dictionary/entity-actions/manifests.ts index 0173032ee9..c797c718e9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/dictionary/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/dictionary/entity-actions/manifests.ts @@ -1,5 +1,5 @@ import { UMB_DICTIONARY_REPOSITORY_ALIAS } from '../repository/manifests.js'; -import { UMB_DICTIONARY_ENTITY_TYPE } from '../entities.js'; +import { UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entities.js'; import UmbReloadDictionaryEntityAction from './reload.action.js'; import UmbImportDictionaryEntityAction from './import/import.action.js'; import UmbExportDictionaryEntityAction from './export/export.action.js'; @@ -18,7 +18,7 @@ const entityActions: Array = [ icon: 'icon-add', label: 'Create', repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS, - entityTypes: [UMB_DICTIONARY_ENTITY_TYPE], + entityTypes: [UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE], }, }, { @@ -57,7 +57,7 @@ const entityActions: Array = [ icon: 'icon-page-up', label: 'Import', repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS, - entityTypes: [UMB_DICTIONARY_ENTITY_TYPE], + entityTypes: [UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE], }, }, { @@ -70,7 +70,7 @@ const entityActions: Array = [ icon: 'icon-refresh', label: 'Reload', repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS, - entityTypes: [UMB_DICTIONARY_ENTITY_TYPE], + entityTypes: [UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE], }, }, { diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/section.manifest.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/section.manifest.ts index eefc5e1c62..9ea2fde786 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/section.manifest.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/section.manifest.ts @@ -1,3 +1,4 @@ +import { UMB_DICTIONARY_ROOT_ENTITY_TYPE } from './dictionary/entities.js'; import type { ManifestDashboard, ManifestSection, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; const sectionAlias = 'Umb.Section.Dictionary'; @@ -15,13 +16,14 @@ const section: ManifestSection = { const menuSectionSidebarApp: ManifestTypes = { type: 'sectionSidebarApp', - kind: 'menu', + kind: 'menuWithEntityActions', alias: 'Umb.SidebarMenu.Dictionary', name: 'Dictionary Sidebar Menu', weight: 100, meta: { label: 'Dictionary', menu: 'Umb.Menu.Dictionary', + entityType: UMB_DICTIONARY_ROOT_ENTITY_TYPE, }, conditions: [ {