File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/packages/core/property-type/workspace Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
7
7
//
8
8
#workspaceContext?: typeof UMB_PROPERTY_TYPE_WORKSPACE_CONTEXT . TYPE ;
9
9
10
+ @state ( )
11
+ _isNew ?: boolean ;
12
+
10
13
@state ( )
11
14
_name ?: string ;
12
15
@@ -18,6 +21,9 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
18
21
19
22
this . consumeContext ( UMB_PROPERTY_TYPE_WORKSPACE_CONTEXT , ( context ) => {
20
23
this . #workspaceContext = context ;
24
+ this . observe ( context . isNew , ( isNew ) => {
25
+ this . _isNew = isNew ;
26
+ } ) ;
21
27
this . observe ( context . name , ( name ) => {
22
28
this . _name = name ;
23
29
} ) ;
@@ -26,11 +32,14 @@ export class UmbPropertyTypeWorkspaceEditorElement extends UmbLitElement {
26
32
}
27
33
28
34
override render ( ) {
29
- return this . workspaceAlias
35
+ return this . workspaceAlias && this . _isNew !== undefined
30
36
? html `
31
37
<umb- wor kspace- edito r
32
38
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
+ ) } >
34
43
</ umb- wor kspace- edito r>
35
44
`
36
45
: '' ;
You can’t perform that action at this time.
0 commit comments