Skip to content

Commit 4ade381

Browse files
committed
correct headline
1 parent d2444f5 commit 4ade381

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/packages/core/property-type/workspace/property-type-workspace-editor.element.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
77
//
88
#workspaceContext?: typeof UMB_PROPERTY_TYPE_WORKSPACE_CONTEXT.TYPE;
99

10+
@state()
11+
_isNew?: boolean;
12+
1013
@state()
1114
_name?: string;
1215

@@ -18,6 +21,9 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
1821

1922
this.consumeContext(UMB_PROPERTY_TYPE_WORKSPACE_CONTEXT, (context) => {
2023
this.#workspaceContext = context;
24+
this.observe(context.isNew, (isNew) => {
25+
this._isNew = isNew;
26+
});
2127
this.observe(context.name, (name) => {
2228
this._name = name;
2329
});
@@ -26,11 +32,14 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
2632
}
2733

2834
override render() {
29-
return this.workspaceAlias
35+
return this.workspaceAlias && this._isNew !== undefined
3036
? html`
3137
<umb-workspace-editor
3238
alias=${this.workspaceAlias}
33-
headline=${this.localize.term('blockEditor_blockConfigurationOverlayTitle', [this._name])}>
39+
headline=${this.localize.term(
40+
this._isNew ? 'contentTypeEditor_addProperty' : 'contentTypeEditor_editProperty',
41+
[this._name],
42+
)}>
3443
</umb-workspace-editor>
3544
`
3645
: '';

0 commit comments

Comments
 (0)