diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts index 1b5bc3ab44..82b40de027 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts @@ -423,36 +423,7 @@ export class UmbBlockGridEntryElement extends UmbLitElement implements UmbProper single >${this._inlineEditingMode ? this.#renderInlineEditBlock() : this.#renderRefBlock()} - - ${this._showContentEdit && this._workspaceEditContentPath - ? html` - - ${this._contentInvalid - ? html`!` - : nothing} - ` - : nothing} - ${this._hasSettings && this._workspaceEditSettingsPath - ? html` - - ${this._settingsInvalid - ? html`!` - : nothing} - ` - : nothing} - this.#context.requestDelete()}> - - - - + ${this.#renderActionBar()} ${!this._showContentEdit && this._contentInvalid ? html`!` : nothing} @@ -473,6 +444,57 @@ export class UmbBlockGridEntryElement extends UmbLitElement implements UmbProper : nothing; } + #renderActionBar() { + return html` + + ${this.#renderEditAction()} ${this.#renderEditSettingsAction()} ${this.#renderDeleteAction()} + `; + } + + #renderEditAction() { + return html` + ${this._showContentEdit && this._workspaceEditContentPath + ? html` + + ${this._contentInvalid + ? html`!` + : nothing} + ` + : nothing} + `; + } + + #renderEditSettingsAction() { + return html` + ${this._hasSettings && this._workspaceEditSettingsPath + ? html` + + ${this._settingsInvalid + ? html`!` + : nothing} + ` + : nothing} + `; + } + + #renderDeleteAction() { + if (this._isReadOnly) return nothing; + return html` + this.#context.requestDelete()}> + + + `; + } + override render() { return this.#renderBlock(); }