move registration to temp-internal-manifests
This commit is contained in:
@@ -4,51 +4,9 @@ import { html, LitElement } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
|
||||
import { UmbContextConsumerMixin } from '../../../core/context';
|
||||
import { UmbExtensionRegistry } from '../../../core/extension';
|
||||
|
||||
@customElement('umb-packages-editor')
|
||||
export class UmbPackagesEditor extends UmbContextConsumerMixin(LitElement) {
|
||||
private umbExtensionRegistry?: UmbExtensionRegistry;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.consumeContext('umbExtensionRegistry', (umbExtensionRegistry: UmbExtensionRegistry) => {
|
||||
this.umbExtensionRegistry = umbExtensionRegistry;
|
||||
this._registerViews();
|
||||
});
|
||||
}
|
||||
|
||||
private _registerViews() {
|
||||
this.umbExtensionRegistry?.register({
|
||||
alias: 'Umb.Editor.Packages.Overview',
|
||||
name: 'Packages',
|
||||
type: 'editorView',
|
||||
elementName: 'umb-packages-overview',
|
||||
loader: () => import('./packages-overview.element'),
|
||||
meta: {
|
||||
icon: 'document',
|
||||
pathname: 'repo',
|
||||
editors: ['Umb.Editor.Packages'],
|
||||
weight: 10,
|
||||
},
|
||||
});
|
||||
|
||||
this.umbExtensionRegistry?.register({
|
||||
alias: 'Umb.Editor.Packages.Installed',
|
||||
name: 'Installed',
|
||||
type: 'editorView',
|
||||
elementName: 'umb-packages-installed',
|
||||
loader: () => import('./packages-installed.element'),
|
||||
meta: {
|
||||
icon: 'document',
|
||||
pathname: 'installed',
|
||||
editors: ['Umb.Editor.Packages'],
|
||||
weight: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<uui-icon-registry-essential>
|
||||
|
||||
@@ -221,6 +221,32 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
icon: 'edit',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'editorView',
|
||||
alias: 'Umb.Editor.Packages.Overview',
|
||||
name: 'Packages',
|
||||
elementName: 'umb-packages-overview',
|
||||
loader: () => import('./backoffice/sections/packages/packages-overview.element'),
|
||||
meta: {
|
||||
icon: 'document',
|
||||
pathname: 'repo',
|
||||
editors: ['Umb.Editor.Packages'],
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'editorView',
|
||||
alias: 'Umb.Editor.Packages.Installed',
|
||||
name: 'Installed',
|
||||
elementName: 'umb-packages-installed',
|
||||
loader: () => import('./backoffice/sections/packages/packages-installed.element'),
|
||||
meta: {
|
||||
icon: 'document',
|
||||
pathname: 'installed',
|
||||
editors: ['Umb.Editor.Packages'],
|
||||
weight: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'propertyAction',
|
||||
alias: 'Umb.PropertyAction.Copy',
|
||||
|
||||
Reference in New Issue
Block a user