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 @@
return html`
<umb-ref-grid-block
standalone
href=${(this.config?.showContentEdit ? this.config?.editContentPath : undefined) ?? ''}>
.readonly=${!this.config?.showContentEdit ?? false}

Check failure on line 37 in src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block/block-grid-block.element.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected constant nullishness on the left-hand side of a `??` expression
.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 @@
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 @@
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}

Check failure on line 37 in src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/ref-list-block/ref-list-block.element.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected constant nullishness on the left-hand side of a `??` expression
.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 @@
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,4 +1,4 @@
import { css, customElement, html, property, state } from '@umbraco-cms/backoffice/external/lit';

Check failure on line 1 in src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts

View workflow job for this annotation

GitHub Actions / build

'state' is defined but never used
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UMB_BLOCK_ENTRY_CONTEXT } from '@umbraco-cms/backoffice/block';

Check failure on line 3 in src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts

View workflow job for this annotation

GitHub Actions / build

'UMB_BLOCK_ENTRY_CONTEXT' is defined but never used
import type { UmbBlockDataType } from '@umbraco-cms/backoffice/block';
Expand Down Expand Up @@ -28,30 +28,16 @@
@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}

Check failure on line 39 in src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected constant nullishness on the left-hand side of a `??` expression
.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 +70,10 @@
z-index: 0;
}

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

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