linting correction

This commit is contained in:
Niels Lyngsø
2024-08-19 15:55:07 +02:00
parent 54c11e1845
commit 75f5eeddea
4 changed files with 60 additions and 56 deletions

View File

@@ -1,24 +1,22 @@
import { ManifestWorkspaceView } from '@umbraco-cms/backoffice/extension-registry';
import type { ManifestWorkspaceView } from '@umbraco-cms/backoffice/extension-registry';
const workspace: ManifestWorkspaceView = {
type: 'workspaceView',
alias: 'Example.WorkspaceView.EntityContentTypeCondition',
name: "Example Workspace View With Entity Content Type Condition",
element : () => import('./workspace-view.element.js'),
meta: {
icon : 'icon-bus',
label : 'Conditional',
pathname : 'conditional'
},
conditions : [
{
alias : 'Umb.Condition.WorkspaceContentTypeAlias',
type: 'workspaceView',
alias: 'Example.WorkspaceView.EntityContentTypeCondition',
name: 'Example Workspace View With Entity Content Type Condition',
element: () => import('./workspace-view.element.js'),
meta: {
icon: 'icon-bus',
label: 'Conditional',
pathname: 'conditional',
},
conditions: [
{
alias: 'Umb.Condition.WorkspaceContentTypeAlias',
//match : 'blogPost'
oneOf : ['blogPost','mediaType1']
}
]
oneOf: ['blogPost', 'mediaType1'],
},
],
};
export const manifests = [
workspace
]
export const manifests = [workspace];

View File

@@ -1,20 +1,19 @@
import { css, html } from 'lit';
import { customElement } from 'lit/decorators.js';
import { html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
@customElement('umb-example-entity-content-type-condition')
export class UmbWorkspaceViewElement extends UmbLitElement {
render() {
return html`<p>This is a conditional element that is only shown in workspaces based on it's entities content type.</p>`;
}
static styles = [css``];
override render() {
return html`<p>
This is a conditional element that is only shown in workspaces based on it's entities content type.
</p>`;
}
}
export default UmbWorkspaceViewElement
export default UmbWorkspaceViewElement;
declare global {
interface HTMLElementTagNameMap {
'umb-example-entity-content-type-condition': UmbWorkspaceViewElement;
}
}
interface HTMLElementTagNameMap {
'umb-example-entity-content-type-condition': UmbWorkspaceViewElement;
}
}