Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export class UmbBlockGridBlockElement extends UmbLitElement {
return html`
<umb-ref-grid-block
standalone
href=${(this.config?.showContentEdit ? this.config?.editContentPath : undefined) ?? ''}>
.readonly=${!(this.config?.showContentEdit ?? false)}
.href=${this.config?.showContentEdit ? this.config?.editContentPath : undefined}>
<umb-icon slot="icon" .name=${this.icon}></umb-icon>
<umb-ufm-render slot="name" inline .markdown=${this.label} .value=${blockValue}></umb-ufm-render>
${when(
Expand All @@ -58,6 +59,10 @@ export class UmbBlockGridBlockElement extends UmbLitElement {
margin: var(--uui-size-2);
}

umb-ufm-render {
user-select: none;
}

uui-tag {
margin-left: 0.5em;
margin-bottom: -0.3em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export class UmbRefListBlockElement extends UmbLitElement {
override render() {
const blockValue = { ...this.content, $settings: this.settings, $index: this.index };
return html`
<uui-ref-node standalone href=${(this.config?.showContentEdit ? this.config?.editContentPath : undefined) ?? ''}>
<uui-ref-node
standalone
.readonly=${!(this.config?.showContentEdit ?? false)}
.href=${this.config?.showContentEdit ? this.config?.editContentPath : undefined}
>>
<umb-icon slot="icon" .name=${this.icon}></umb-icon>
<umb-ufm-render slot="name" inline .markdown=${this.label} .value=${blockValue}></umb-ufm-render>
${when(
Expand All @@ -57,6 +61,11 @@ export class UmbRefListBlockElement extends UmbLitElement {
margin-top: -0.3em;
vertical-align: text-top;
}

umb-ufm-render {
user-select: none;
}

:host([unpublished]) umb-icon,
:host([unpublished]) umb-ufm-render {
opacity: 0.6;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css, customElement, html, property, state } from '@umbraco-cms/backoffice/external/lit';
import { css, customElement, html, property } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UMB_BLOCK_ENTRY_CONTEXT } from '@umbraco-cms/backoffice/block';
import type { UmbBlockDataType } from '@umbraco-cms/backoffice/block';
import type { UmbBlockEditorCustomViewConfiguration } from '@umbraco-cms/backoffice/block-custom-view';

Expand Down Expand Up @@ -28,30 +27,16 @@ export class UmbRefRteBlockElement extends UmbLitElement {
@property({ attribute: false })
settings?: UmbBlockDataType;

@state()
private _workspaceEditPath?: string;

@property({ attribute: false })
config?: UmbBlockEditorCustomViewConfiguration;

constructor() {
super();

this.consumeContext(UMB_BLOCK_ENTRY_CONTEXT, (context) => {
this.observe(
context?.workspaceEditContentPath,
(workspaceEditPath) => {
this._workspaceEditPath = workspaceEditPath;
},
'observeWorkspaceEditPath',
);
});
}

override render() {
const blockValue = { ...this.content, $settings: this.settings, $index: this.index };
return html`
<uui-ref-node standalone href=${(this.config?.showContentEdit ? this._workspaceEditPath : undefined) ?? ''}>
<uui-ref-node
standalone
.readonly=${!(this.config?.showContentEdit ?? false)}
.href=${this.config?.showContentEdit ? this.config?.editContentPath : undefined}>
<div class="selection-background" aria-hidden="true">&emsp;</div>
<umb-icon slot="icon" .name=${this.icon}></umb-icon>
<umb-ufm-render slot="name" inline .markdown=${this.label} .value=${blockValue}></umb-ufm-render>
Expand Down Expand Up @@ -84,6 +69,10 @@ export class UmbRefRteBlockElement extends UmbLitElement {
z-index: 0;
}

umb-ufm-render {
user-select: none;
}

umb-icon,
umb-ufm-render {
z-index: 1;
Expand Down
Loading