diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts index a731b87c06..9bb746b044 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user-group/editor-user-group.element.ts @@ -1,10 +1,163 @@ -import { html, LitElement } from 'lit'; -import { customElement } from 'lit/decorators.js'; +import { UUIInputElement, UUIInputEvent } from '@umbraco-ui/uui'; +import { UUITextStyles } from '@umbraco-ui/uui-css'; +import { css, html, LitElement, nothing } from 'lit'; +import { customElement, property, state } from 'lit/decorators.js'; @customElement('umb-editor-user-group') export class UmbEditorUserGroupElement extends LitElement { + static styles = [ + UUITextStyles, + css` + :host { + display: block; + height: 100%; + } + + #main { + display: grid; + grid-template-columns: 1fr 350px; + gap: var(--uui-size-space-6); + padding: var(--uui-size-space-6); + } + + #left-column { + display: flex; + flex-direction: column; + gap: var(--uui-size-space-4); + } + #right-column > uui-box > div { + display: flex; + flex-direction: column; + gap: var(--uui-size-space-2); + } + uui-avatar { + font-size: var(--uui-size-16); + place-self: center; + } + hr { + border: none; + border-bottom: 1px solid var(--uui-color-divider); + width: 100%; + } + uui-input { + width: 100%; + } + .faded-text { + color: var(--uui-color-text-alt); + font-size: 0.8rem; + } + uui-tag { + width: fit-content; + } + #user-info { + display: flex; + gap: var(--uui-size-space-6); + } + #user-info > div { + display: flex; + flex-direction: column; + } + #assign-access { + display: flex; + flex-direction: column; + gap: var(--uui-size-space-4); + } + .access-content { + margin-top: var(--uui-size-space-1); + margin-bottom: var(--uui-size-space-4); + display: flex; + align-items: center; + line-height: 1; + gap: var(--uui-size-space-3); + } + .access-content > span { + align-self: end; + } + `, + ]; + + @state() + private _userName = ''; + + @property({ type: String }) + entityKey = ''; + + private _languages = []; //TODO Add languages + + private renderLeftColumn() { + return html` +
Profile
+ + Email + + + + Language + + +
+ +
+
Assign access
+
+ Groups +
Add groups to assign access and permissions
+
+
+ Content start nodes +
Limit the content tree to specific start nodes
+ +
+
+ Media start nodes +
Limit the media library to specific start nodes
+ +
+
+
+ +
Access
+
+ Based on the assigned groups and start nodes, the user has access to the following nodes +
+ + Content +
+ + Content Root +
+ + Media +
+ + Media Root +
+
`; + } + + private renderRightColumn() { + return html` RIGHT `; + } + + // TODO. find a way where we don't have to do this for all editors. + private _handleInput(event: UUIInputEvent) { + if (event instanceof UUIInputEvent) { + const target = event.composedPath()[0] as UUIInputElement; + + console.log('input', target.value); + } + } + render() { - return html`
User Group
`; + return html` + + +
+
${this.renderLeftColumn()}
+
${this.renderRightColumn()}
+
+
+ `; } } diff --git a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts index ed15c93ad2..f411b5cb3f 100644 --- a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts +++ b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts @@ -292,6 +292,15 @@ export const internalManifests: Array Promise import('../backoffice/editors/user-group/editor-user-group.element'), + meta: { + entityType: 'userGroup', + }, + }, { type: 'editorAction', alias: 'Umb.EditorAction.User.Save',