correct headline
This commit is contained in:
@@ -7,6 +7,9 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
|
||||
//
|
||||
#workspaceContext?: typeof UMB_PROPERTY_TYPE_WORKSPACE_CONTEXT.TYPE;
|
||||
|
||||
@state()
|
||||
_isNew?: boolean;
|
||||
|
||||
@state()
|
||||
_name?: string;
|
||||
|
||||
@@ -18,6 +21,9 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
|
||||
|
||||
this.consumeContext(UMB_PROPERTY_TYPE_WORKSPACE_CONTEXT, (context) => {
|
||||
this.#workspaceContext = context;
|
||||
this.observe(context.isNew, (isNew) => {
|
||||
this._isNew = isNew;
|
||||
});
|
||||
this.observe(context.name, (name) => {
|
||||
this._name = name;
|
||||
});
|
||||
@@ -26,11 +32,14 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
override render() {
|
||||
return this.workspaceAlias
|
||||
return this.workspaceAlias && this._isNew !== undefined
|
||||
? html`
|
||||
<umb-workspace-editor
|
||||
alias=${this.workspaceAlias}
|
||||
headline=${this.localize.term('blockEditor_blockConfigurationOverlayTitle', [this._name])}>
|
||||
headline=${this.localize.term(
|
||||
this._isNew ? 'contentTypeEditor_addProperty' : 'contentTypeEditor_editProperty',
|
||||
[this._name],
|
||||
)}>
|
||||
</umb-workspace-editor>
|
||||
`
|
||||
: '';
|
||||
|
||||
Reference in New Issue
Block a user