From 5346ac2f9dfce0184b79847d5980e1b7cc822240 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 2 Jan 2023 22:39:17 +0100 Subject: [PATCH] add icon store to app element --- src/Umbraco.Web.UI.Client/src/app.ts | 5 +++++ .../src/backoffice/backoffice.element.ts | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/app.ts b/src/Umbraco.Web.UI.Client/src/app.ts index 839758fa33..1980d5f434 100644 --- a/src/Umbraco.Web.UI.Client/src/app.ts +++ b/src/Umbraco.Web.UI.Client/src/app.ts @@ -15,6 +15,7 @@ import { UUIIconRegistryEssential } from '@umbraco-ui/uui'; import { css, html, LitElement } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; +import { UmbIconStore } from '@umbraco-cms/stores/icon/icon.store'; import { OpenAPI, RuntimeLevel, ServerResource } from '@umbraco-cms/backend-api'; import { UmbContextProviderMixin } from '@umbraco-cms/context-api'; @@ -60,12 +61,16 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) { }, ]; + private _umbIconRegistry = new UmbIconStore(); + private _iconRegistry = new UUIIconRegistryEssential(); private _runtimeLevel = RuntimeLevel.UNKNOWN; constructor() { super(); + this._umbIconRegistry.attach(this); + this._setup(); } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts index addcfe1e1b..7ea201329c 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts @@ -18,7 +18,6 @@ import { UmbDocumentBlueprintStore } from './documents/document-blueprints/docum import { UmbSectionStore } from './core/components/section/section.store'; import { UmbDataTypeStore } from './core/data-types/data-type.store'; -import { UmbIconStore } from '../core/stores/icon/icon.store'; import { UmbNotificationService } from '../core/services/notification'; import { UmbModalService } from '../core/services/modal'; import { manifests as collectionBulkActionManifests } from './core/components/collection/bulk-actions/manifests'; @@ -55,8 +54,6 @@ export class UmbBackofficeElement extends UmbContextConsumerMixin(UmbContextProv `, ]; - private _umbIconRegistry = new UmbIconStore(); - constructor() { super(); @@ -64,8 +61,6 @@ export class UmbBackofficeElement extends UmbContextConsumerMixin(UmbContextProv this._registerExtensions(collectionBulkActionManifests); this._registerExtensions(collectionViewManifests); - this._umbIconRegistry.attach(this); - // TODO: find a way this is possible outside this element. It needs to be possible to register stores in extensions this.provideContext('umbCurrentUserStore', new UmbCurrentUserStore()); this.provideContext('umbDocumentStore', new UmbDocumentStore());