From efa02c309bcd986e2b90234052d1bc3d7e1168bd Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 1 Jun 2023 13:35:23 +0200 Subject: [PATCH] Put button menu above toolbar in automation editor (#16716) --- .../action/ha-automation-action-row.ts | 1 + .../automation/action/ha-automation-action.ts | 6 +- .../condition/ha-automation-condition-row.ts | 1 + .../condition/ha-automation-condition.ts | 6 +- .../trigger/ha-automation-trigger-row.ts | 1 + .../trigger/ha-automation-trigger.ts | 73 +++++++++---------- 6 files changed, 49 insertions(+), 39 deletions(-) diff --git a/src/panels/config/automation/action/ha-automation-action-row.ts b/src/panels/config/automation/action/ha-automation-action-row.ts index 12799d6491..4aa1ded268 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -191,6 +191,7 @@ export default class HaAutomationActionRow extends LitElement { slot="icons" @action=${this._handleAction} @click=${preventDefault} + fixed > - + - + + ${this.reOrderMode && !this.nested + ? html` + + ${this.hass.localize( + "ui.panel.config.automation.editor.re_order_mode.description_triggers" + )} + ${this.hass.localize( - "ui.panel.config.automation.editor.re_order_mode.description_triggers" + "ui.panel.config.automation.editor.re_order_mode.exit" )} - - ${this.hass.localize( - "ui.panel.config.automation.editor.re_order_mode.exit" - )} - - - ` - : null - } + + + ` + : null}
${repeat( this.triggers, @@ -141,8 +139,11 @@ export default class HaAutomationTrigger extends LitElement { ` )} -
- + - ${ - this.clipboard?.trigger - ? html` - ${this.hass.localize( - "ui.panel.config.automation.editor.triggers.paste" - )} - (${this.hass.localize( - `ui.panel.config.automation.editor.triggers.type.${this.clipboard.trigger.platform}.label` - )}) - ` - : nothing - } + ${this.clipboard?.trigger + ? html` + ${this.hass.localize( + "ui.panel.config.automation.editor.triggers.paste" + )} + (${this.hass.localize( + `ui.panel.config.automation.editor.triggers.type.${this.clipboard.trigger.platform}.label` + )}) + ` + : nothing} ${this._processedTypes(this.hass.localize).map( ([opt, label, icon]) => html`