mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Disable reorder for readonly automation and disabled block (#19592)
This commit is contained in:
parent
62bb9b1a87
commit
601a165b2a
@ -77,7 +77,7 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-sortable
|
<ha-sortable
|
||||||
handle-selector=".handle"
|
handle-selector=".handle"
|
||||||
.disabled=${!this._showReorder}
|
.disabled=${!this._showReorder || this.disabled}
|
||||||
@item-moved=${this._actionMoved}
|
@item-moved=${this._actionMoved}
|
||||||
group="actions"
|
group="actions"
|
||||||
.path=${this.path}
|
.path=${this.path}
|
||||||
@ -101,7 +101,7 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
@value-changed=${this._actionChanged}
|
@value-changed=${this._actionChanged}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
>
|
>
|
||||||
${this._showReorder
|
${this._showReorder && !this.disabled
|
||||||
? html`
|
? html`
|
||||||
<div class="handle" slot="icons">
|
<div class="handle" slot="icons">
|
||||||
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
||||||
|
@ -122,7 +122,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-sortable
|
<ha-sortable
|
||||||
handle-selector=".handle"
|
handle-selector=".handle"
|
||||||
.disabled=${!this._showReorder}
|
.disabled=${!this._showReorder || this.disabled}
|
||||||
group="choose-options"
|
group="choose-options"
|
||||||
.path=${[...(this.path ?? []), "choose"]}
|
.path=${[...(this.path ?? []), "choose"]}
|
||||||
>
|
>
|
||||||
@ -148,7 +148,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
|||||||
? ""
|
? ""
|
||||||
: this._getDescription(option))}
|
: this._getDescription(option))}
|
||||||
</h3>
|
</h3>
|
||||||
${this._showReorder
|
${this._showReorder && !this.disabled
|
||||||
? html`
|
? html`
|
||||||
<div class="handle" slot="icons">
|
<div class="handle" slot="icons">
|
||||||
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
||||||
|
@ -117,7 +117,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-sortable
|
<ha-sortable
|
||||||
handle-selector=".handle"
|
handle-selector=".handle"
|
||||||
.disabled=${!this._showReorder}
|
.disabled=${!this._showReorder || this.disabled}
|
||||||
@item-moved=${this._conditionMoved}
|
@item-moved=${this._conditionMoved}
|
||||||
group="conditions"
|
group="conditions"
|
||||||
.path=${this.path}
|
.path=${this.path}
|
||||||
@ -141,7 +141,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
@value-changed=${this._conditionChanged}
|
@value-changed=${this._conditionChanged}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
>
|
>
|
||||||
${this._showReorder
|
${this._showReorder && !this.disabled
|
||||||
? html`
|
? html`
|
||||||
<div class="handle" slot="icons">
|
<div class="handle" slot="icons">
|
||||||
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
||||||
|
@ -74,7 +74,7 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-sortable
|
<ha-sortable
|
||||||
handle-selector=".handle"
|
handle-selector=".handle"
|
||||||
.disabled=${!this._showReorder}
|
.disabled=${!this._showReorder || this.disabled}
|
||||||
@item-moved=${this._triggerMoved}
|
@item-moved=${this._triggerMoved}
|
||||||
group="triggers"
|
group="triggers"
|
||||||
.path=${this.path}
|
.path=${this.path}
|
||||||
@ -97,7 +97,7 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
>
|
>
|
||||||
${this._showReorder
|
${this._showReorder && !this.disabled
|
||||||
? html`
|
? html`
|
||||||
<div class="handle" slot="icons">
|
<div class="handle" slot="icons">
|
||||||
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
<ha-svg-icon .path=${mdiDrag}></ha-svg-icon>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user