@@ -3,10 +3,8 @@ import { UMB_USER_ROOT_WORKSPACE_PATH } from '../../paths.js';
3
3
import type { UmbUserWorkspaceContext } from './user-workspace.context.js' ;
4
4
import { UMB_USER_WORKSPACE_CONTEXT } from './user-workspace.context-token.js' ;
5
5
import { UMB_USER_WORKSPACE_ALIAS } from './constants.js' ;
6
- import type { UUIInputElement } from '@umbraco-cms/backoffice/external/uui' ;
7
- import { UUIInputEvent } from '@umbraco-cms/backoffice/external/uui' ;
8
6
import { css , html , nothing , customElement , state } from '@umbraco-cms/backoffice/external/lit' ;
9
- import { UmbLitElement , umbFocus } from '@umbraco-cms/backoffice/lit-element' ;
7
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element' ;
10
8
import { UmbTextStyles } from '@umbraco-cms/backoffice/style' ;
11
9
12
10
// import local components. Theses are not meant to be used outside of this component.
@@ -37,17 +35,6 @@ export class UmbUserWorkspaceEditorElement extends UmbLitElement {
37
35
this . observe ( this . #workspaceContext. data , ( user ) => ( this . _user = user ) , 'umbUserObserver' ) ;
38
36
}
39
37
40
- // TODO. find a way where we don't have to do this for all workspaces.
41
- #onNameChange( event : UUIInputEvent ) {
42
- if ( event instanceof UUIInputEvent ) {
43
- const target = event . composedPath ( ) [ 0 ] as UUIInputElement ;
44
-
45
- if ( typeof target ?. value === 'string' ) {
46
- this . #workspaceContext?. updateProperty ( 'name' , target . value ) ;
47
- }
48
- }
49
- }
50
-
51
38
override render ( ) {
52
39
if ( ! this . _user ) return html `User not found ` ;
53
40
@@ -67,9 +54,7 @@ export class UmbUserWorkspaceEditorElement extends UmbLitElement {
67
54
68
55
#renderHeader( ) {
69
56
return html `
70
- <div id= "header" slot = "header">
71
- <uui- input id= "name" .value = ${ this . _user ?. name ?? '' } @input = "${ this . #onNameChange} " ${ umbFocus ( ) } > </ uui- input>
72
- </ div>
57
+ <umb- wor kspace- name slot= "header" > </ umb- wor kspace- name>
73
58
<umb- wor kspace- entity- action- menu slot= "action-menu" > </ umb- wor kspace- entity- action- menu>
74
59
` ;
75
60
}
@@ -106,11 +91,6 @@ export class UmbUserWorkspaceEditorElement extends UmbLitElement {
106
91
height : 100% ;
107
92
}
108
93
109
- # header {
110
- width : 100% ;
111
- display : grid;
112
- }
113
-
114
94
# main {
115
95
display : grid;
116
96
grid-template-columns : 1fr 350px ;
0 commit comments