From d818cc227cd9c33f704d5ffec17566fde9abf23a Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:44:30 +0100 Subject: [PATCH] align naming --- .../src/packages/webhooks/collection/action/manifests.ts | 2 +- .../src/packages/webhooks/collection/manifests.ts | 2 +- .../src/packages/webhooks/collection/views/manifests.ts | 2 +- .../src/packages/webhooks/entity.ts | 4 +--- .../src/packages/webhooks/umbraco-package.ts | 6 +++--- .../src/packages/webhooks/workspace/webhooks.context.ts | 9 ++------- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/action/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/action/manifests.ts index bfaabbb79a..e6861fae97 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/action/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/action/manifests.ts @@ -14,7 +14,7 @@ export const createManifest: ManifestCollectionAction = { conditions: [ { alias: UMB_COLLECTION_ALIAS_CONDITION, - match: 'Umb.Collection.Webhook', + match: 'Umb.Collection.Webhooks', }, ], }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/manifests.ts index 913d773738..a1a884c82c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/manifests.ts @@ -6,7 +6,7 @@ import { manifests as collectionViewManifests } from './views/manifests.js'; import { manifests as collectionActionManifests } from './action/manifests.js'; import type { ManifestCollection } from '@umbraco-cms/backoffice/extension-registry'; -export const UMB_WEBHOOK_COLLECTION_ALIAS = 'Umb.Collection.Webhook'; +export const UMB_WEBHOOK_COLLECTION_ALIAS = 'Umb.Collection.Webhooks'; const collectionManifest: ManifestCollection = { type: 'collection', diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/views/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/views/manifests.ts index 2eed3f5374..75a8dda29d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/views/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhooks/collection/views/manifests.ts @@ -16,7 +16,7 @@ const tableCollectionView: ManifestCollectionView = { conditions: [ { alias: UMB_COLLECTION_ALIAS_CONDITION, - match: 'Umb.Collection.Webhook', + match: 'Umb.Collection.Webhooks', }, ], }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhooks/entity.ts b/src/Umbraco.Web.UI.Client/src/packages/webhooks/entity.ts index 90e4c7b9ed..b6742fd63b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhooks/entity.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhooks/entity.ts @@ -1,5 +1,3 @@ -export const UMB_WEBHOOK_ENTITY_TYPE = 'webhook'; -export const UMB_WEBHOOK_ROOT_ENTITY_TYPE = 'webhook-root'; +export const UMB_WEBHOOK_ENTITY_TYPE = 'webhooks'; export type UmbWebhookEntityType = typeof UMB_WEBHOOK_ENTITY_TYPE; -export type UmbWebhookRootEntityType = typeof UMB_WEBHOOK_ROOT_ENTITY_TYPE; diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhooks/umbraco-package.ts b/src/Umbraco.Web.UI.Client/src/packages/webhooks/umbraco-package.ts index a5c24dd8b6..035cc47070 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhooks/umbraco-package.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhooks/umbraco-package.ts @@ -1,8 +1,8 @@ -export const name = 'Umbraco.Core.Webhook'; +export const name = 'Umbraco.Core.Webhooks'; export const extensions = [ { - name: 'Webhook Bundle', - alias: 'Umb.Bundle.Webhook', + name: 'Webhooks Bundle', + alias: 'Umb.Bundle.Webhooks', type: 'bundle', js: () => import('./manifests.js'), }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhooks/workspace/webhooks.context.ts b/src/Umbraco.Web.UI.Client/src/packages/webhooks/workspace/webhooks.context.ts index 2d5aaa3cd4..449105d31b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhooks/workspace/webhooks.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhooks/workspace/webhooks.context.ts @@ -1,3 +1,4 @@ +import { UMB_WEBHOOK_ENTITY_TYPE } from '../entity.js'; import { UmbWebhookRepository } from '../repository/webhooks.repository.js'; import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api'; import { UmbBaseController } from '@umbraco-cms/backoffice/class-api'; @@ -10,19 +11,13 @@ export class UmbWebhooksWorkspaceContext extends UmbBaseController implements Um #repository; getEntityType() { - return 'webhooks'; - } - - getEntityName() { - return 'Webhooks'; + return UMB_WEBHOOK_ENTITY_TYPE; } getUnique() { return undefined; } - currentPage = 1; - constructor(host: UmbControllerHostElement) { super(host); this.provideContext(UMB_WORKSPACE_CONTEXT, this);