From 2815d98e41e568cd716c1338ca4859b1e89cffb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 20 Dec 2023 15:36:50 +0100 Subject: [PATCH] append routes --- .../input-block-type/input-block-type.context.ts | 5 ++++- .../input-block-type/input-block-type.element.ts | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.context.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.context.ts index 5ddf61e1a7..097c471a6b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.context.ts @@ -11,13 +11,16 @@ export class UmbBlockTypeInputContext void) { super(host, 'blockTypeInput'); this.#blockTypeWorkspaceModalRegistration = new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL) .addAdditionalPath('block-type') .onSetup(() => { return { data: { entityType: 'block-type', preset: {} } }; + }) + .observeRouteBuilder((routeBuilder) => { + onWorkspaceRoutePathChanged(routeBuilder({})); }); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.element.ts index 4cd2568700..382f91c955 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/input-block-type/input-block-type.element.ts @@ -6,6 +6,7 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element'; @customElement('umb-input-block-type') export class UmbInputBlockTypeElement extends UmbLitElement { // + @property({ type: Array, attribute: false }) public get value() { return this._items; @@ -17,7 +18,10 @@ export class UmbInputBlockTypeElement = []; - #context = new UmbBlockTypeInputContext(this); + @state() + private _workspacePath?: string; + + #context = new UmbBlockTypeInputContext(this, (workspacePath) => (this._workspacePath = workspacePath)); constructor() { super(); @@ -51,7 +55,7 @@ export class UmbInputBlockTypeElement +