Fix automation editor (#16057)
This commit is contained in:
parent
28304bb1dc
commit
1596578f96
|
@ -92,11 +92,7 @@ export class HassioAddonStore extends LitElement {
|
|||
.route=${this.route}
|
||||
.header=${this.supervisor.localize("panel.store")}
|
||||
>
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
slot="toolbar-icon"
|
||||
@action=${this._handleAction}
|
||||
>
|
||||
<ha-button-menu slot="toolbar-icon" @action=${this._handleAction}>
|
||||
<ha-icon-button
|
||||
.label=${this.supervisor.localize("common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
|
|
|
@ -168,7 +168,7 @@ class HassioAddonConfig extends LitElement {
|
|||
${this.supervisor.localize("addon.configuration.options.header")}
|
||||
</h2>
|
||||
<div class="card-menu">
|
||||
<ha-button-menu corner="BOTTOM_START" @action=${this._handleAction}>
|
||||
<ha-button-menu @action=${this._handleAction}>
|
||||
<ha-icon-button
|
||||
.label=${this.supervisor.localize("common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
|
|
|
@ -195,11 +195,7 @@ export class HassioBackups extends LitElement {
|
|||
: "/config"}
|
||||
supervisor
|
||||
>
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
slot="toolbar-icon"
|
||||
@action=${this._handleAction}
|
||||
>
|
||||
<ha-button-menu slot="toolbar-icon" @action=${this._handleAction}>
|
||||
<ha-icon-button
|
||||
.label=${this.supervisor?.localize("common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
|
|
|
@ -184,7 +184,7 @@ class HassioHostInfo extends LitElement {
|
|||
`
|
||||
: ""}
|
||||
|
||||
<ha-button-menu corner="BOTTOM_START">
|
||||
<ha-button-menu>
|
||||
<ha-icon-button
|
||||
.label=${this.supervisor.localize("common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
|
|
|
@ -10,7 +10,7 @@ import type { HaIconButton } from "./ha-icon-button";
|
|||
export class HaButtonMenu extends LitElement {
|
||||
protected readonly [FOCUS_TARGET];
|
||||
|
||||
@property() public corner: Corner = "TOP_START";
|
||||
@property() public corner: Corner = "BOTTOM_START";
|
||||
|
||||
@property() public menuCorner: MenuCorner = "START";
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ interface FilterValue {
|
|||
export class HaRelatedFilterButtonMenu extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
|
||||
@property() public corner: Corner = "TOP_START";
|
||||
@property() public corner: Corner = "BOTTOM_START";
|
||||
|
||||
@property({ type: Boolean, reflect: true }) public narrow = false;
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ export class HaFormMultiSelect extends LitElement implements HaFormElement {
|
|||
<ha-button-menu
|
||||
.disabled=${this.disabled}
|
||||
fixed
|
||||
corner="BOTTOM_START"
|
||||
@opened=${this._handleOpen}
|
||||
@closed=${this._handleClose}
|
||||
multi
|
||||
|
|
|
@ -38,7 +38,6 @@ export class HaIconOverflowMenu extends LitElement {
|
|||
@click=${this._handleIconOverflowMenuOpened}
|
||||
@closed=${this._handleIconOverflowMenuClosed}
|
||||
class="ha-icon-overflow-menu-overflow"
|
||||
corner="BOTTOM_START"
|
||||
absolute
|
||||
>
|
||||
<ha-icon-button
|
||||
|
|
|
@ -70,11 +70,7 @@ class HaQrScanner extends LitElement {
|
|||
? html`<video></video>
|
||||
<div id="canvas-container">
|
||||
${this._cameras && this._cameras.length > 1
|
||||
? html`<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
fixed
|
||||
@closed=${stopPropagation}
|
||||
>
|
||||
? html`<ha-button-menu fixed @closed=${stopPropagation}>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.localize(
|
||||
|
|
|
@ -283,7 +283,6 @@ export class HaTargetPicker extends LitElement {
|
|||
return html`<mwc-menu-surface
|
||||
open
|
||||
.anchor=${this._addContainer}
|
||||
.corner=${"BOTTOM_START"}
|
||||
@closed=${this._onClosed}
|
||||
@opened=${this._onOpened}
|
||||
@opened-changed=${this._openedChanged}
|
||||
|
|
|
@ -274,7 +274,6 @@ class MoreInfoFan extends LitElement {
|
|||
supportsPresetMode && this.stateObj.attributes.preset_modes
|
||||
? html`
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
@action=${this._handlePresetMode}
|
||||
@closed=${stopPropagation}
|
||||
fixed
|
||||
|
|
|
@ -173,7 +173,6 @@ class MoreInfoLight extends LitElement {
|
|||
${supportsEffects && this.stateObj.attributes.effect_list
|
||||
? html`
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
@action=${this._handleEffectButton}
|
||||
@closed=${stopPropagation}
|
||||
fixed
|
||||
|
|
|
@ -99,6 +99,8 @@ class HassSubpage extends LitElement {
|
|||
display: block;
|
||||
height: 100%;
|
||||
background-color: var(--primary-background-color);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:host([narrow]) {
|
||||
|
@ -152,7 +154,7 @@ class HassSubpage extends LitElement {
|
|||
}
|
||||
|
||||
#fab {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
right: calc(16px + env(safe-area-inset-right));
|
||||
bottom: calc(16px + env(safe-area-inset-bottom));
|
||||
z-index: 1;
|
||||
|
|
|
@ -182,8 +182,6 @@ export default class HaAutomationActionRow extends LitElement {
|
|||
: html`
|
||||
<ha-button-menu
|
||||
slot="icons"
|
||||
fixed
|
||||
corner="BOTTOM_START"
|
||||
@action=${this._handleAction}
|
||||
@click=${preventDefault}
|
||||
>
|
||||
|
|
|
@ -128,11 +128,7 @@ export default class HaAutomationAction extends LitElement {
|
|||
`
|
||||
)}
|
||||
</div>
|
||||
<ha-button-menu
|
||||
fixed
|
||||
@action=${this._addAction}
|
||||
.disabled=${this.disabled}
|
||||
>
|
||||
<ha-button-menu @action=${this._addAction} .disabled=${this.disabled}>
|
||||
<ha-button
|
||||
slot="trigger"
|
||||
outlined
|
||||
|
|
|
@ -116,8 +116,6 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||
: html`
|
||||
<ha-button-menu
|
||||
slot="icons"
|
||||
fixed
|
||||
corner="BOTTOM_START"
|
||||
@action=${this._handleAction}
|
||||
@click=${preventDefault}
|
||||
>
|
||||
|
|
|
@ -180,11 +180,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||
`
|
||||
)}
|
||||
</div>
|
||||
<ha-button-menu
|
||||
fixed
|
||||
@action=${this._addCondition}
|
||||
.disabled=${this.disabled}
|
||||
>
|
||||
<ha-button-menu @action=${this._addCondition} .disabled=${this.disabled}>
|
||||
<ha-button
|
||||
slot="trigger"
|
||||
outlined
|
||||
|
|
|
@ -141,7 +141,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
|
|||
</mwc-button>
|
||||
`
|
||||
: ""}
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -287,7 +287,6 @@ class HaAutomationPicker extends LitElement {
|
|||
></ha-icon-button>
|
||||
<ha-button-related-filter-menu
|
||||
slot="filter-menu"
|
||||
corner="BOTTOM_START"
|
||||
.narrow=${this.narrow}
|
||||
.hass=${this.hass}
|
||||
.value=${this._filterValue}
|
||||
|
|
|
@ -113,7 +113,7 @@ export class HaAutomationTrace extends LitElement {
|
|||
</a>
|
||||
`
|
||||
: ""}
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -140,8 +140,6 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||
: html`
|
||||
<ha-button-menu
|
||||
slot="icons"
|
||||
fixed
|
||||
corner="BOTTOM_START"
|
||||
@action=${this._handleAction}
|
||||
@click=${preventDefault}
|
||||
>
|
||||
|
|
|
@ -168,7 +168,6 @@ class CloudAlexa extends LitElement {
|
|||
${!emptyFilter
|
||||
? html`${iconButton}`
|
||||
: html`<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
.entityId=${stateObj.entity_id}
|
||||
@action=${this._exposeChanged}
|
||||
>
|
||||
|
@ -225,7 +224,7 @@ class CloudAlexa extends LitElement {
|
|||
.narrow=${this.narrow}
|
||||
.header=${this.hass!.localize("ui.panel.config.cloud.alexa.title")}
|
||||
>
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -228,7 +228,6 @@ class CloudGoogleAssistant extends LitElement {
|
|||
${!emptyFilter
|
||||
? html`${iconButton}`
|
||||
: html`<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
.entityId=${entity.entity_id}
|
||||
@action=${this._exposeChanged}
|
||||
>
|
||||
|
@ -302,7 +301,7 @@ class CloudGoogleAssistant extends LitElement {
|
|||
.hass=${this.hass}
|
||||
.header=${this.hass!.localize("ui.panel.config.cloud.google.title")}
|
||||
.narrow=${this.narrow}>
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -69,7 +69,7 @@ class HaConfigSectionUpdates extends LitElement {
|
|||
.path=${mdiUpdate}
|
||||
@click=${this._checkUpdates}
|
||||
></ha-icon-button>
|
||||
<ha-button-menu corner="BOTTOM_START" multi>
|
||||
<ha-button-menu multi>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -194,11 +194,7 @@ class HaConfigDashboard extends SubscribeMixin(LitElement) {
|
|||
.path=${mdiMagnify}
|
||||
@click=${this._showQuickBar}
|
||||
></ha-icon-button>
|
||||
<ha-button-menu
|
||||
slot="actionItems"
|
||||
corner="BOTTOM_START"
|
||||
@action=${this._handleMenuAction}
|
||||
>
|
||||
<ha-button-menu slot="actionItems" @action=${this._handleMenuAction}>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -748,7 +748,7 @@ export class HaConfigDevicePage extends LitElement {
|
|||
|
||||
${actions.length
|
||||
? html`
|
||||
<ha-button-menu corner="BOTTOM_START">
|
||||
<ha-button-menu>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize(
|
||||
|
|
|
@ -448,7 +448,7 @@ export class HaConfigDeviceDashboard extends LitElement {
|
|||
>
|
||||
<ha-svg-icon slot="icon" .path=${mdiPlus}></ha-svg-icon>
|
||||
</ha-fab>
|
||||
<ha-button-menu slot="filter-menu" corner="BOTTOM_START" multi>
|
||||
<ha-button-menu slot="filter-menu" multi>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass!.localize(
|
||||
|
|
|
@ -620,7 +620,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||
</div>
|
||||
`
|
||||
: html`
|
||||
<ha-button-menu slot="filter-menu" corner="BOTTOM_START" multi>
|
||||
<ha-button-menu slot="filter-menu" multi>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass!.localize(
|
||||
|
|
|
@ -60,7 +60,7 @@ export class HaConfigFlowCard extends LitElement {
|
|||
}`
|
||||
)}
|
||||
></mwc-button>
|
||||
<ha-button-menu corner="BOTTOM_START">
|
||||
<ha-button-menu>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -382,7 +382,6 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
|||
? html`<span class="badge">${disabledCount}</span>`
|
||||
: ""}
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
multi
|
||||
@action=${this._handleMenuAction}
|
||||
@click=${this._preventDefault}
|
||||
|
|
|
@ -370,7 +370,7 @@ export class HaIntegrationCard extends LitElement {
|
|||
`
|
||||
: ""}
|
||||
</div>
|
||||
<ha-button-menu corner="BOTTOM_START">
|
||||
<ha-button-menu>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -12,7 +12,7 @@ export class HaIntegrationOverflowMenu extends LitElement {
|
|||
|
||||
protected render() {
|
||||
return html`
|
||||
<ha-button-menu activatable corner="BOTTOM_START">
|
||||
<ha-button-menu activatable>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -69,7 +69,7 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
|||
|
||||
return html`
|
||||
<hass-subpage .narrow=${this.narrow} .hass=${this.hass} header="Thread">
|
||||
<ha-button-menu slot="toolbar-icon" corner="BOTTOM_START">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
.path=${mdiDotsVertical}
|
||||
slot="trigger"
|
||||
|
@ -186,7 +186,6 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
|||
<span slot="secondary">${router.server}</span>
|
||||
${router.extended_address === this._otbrInfo?.extended_address
|
||||
? html`<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
slot="meta"
|
||||
@action=${this._handleRouterAction}
|
||||
>
|
||||
|
|
|
@ -115,7 +115,7 @@ export class HaConfigLogs extends LitElement {
|
|||
${isComponentLoaded(this.hass, "hassio") &&
|
||||
this.hass.userData?.showAdvanced
|
||||
? html`
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-button
|
||||
slot="trigger"
|
||||
.label=${this._logProviders.find(
|
||||
|
|
|
@ -267,11 +267,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||
>
|
||||
${this.hass.userData?.showAdvanced
|
||||
? html`
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
slot="toolbar-icon"
|
||||
activatable
|
||||
>
|
||||
<ha-button-menu slot="toolbar-icon" activatable>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -248,7 +248,7 @@ export class HassioNetwork extends LitElement {
|
|||
</ha-circular-progress>`
|
||||
: this.hass.localize("ui.common.save")}
|
||||
</mwc-button>
|
||||
<ha-button-menu corner="BOTTOM_START" @action=${this._handleAction}>
|
||||
<ha-button-menu @action=${this._handleAction}>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${"ui.common.menu"}
|
||||
|
|
|
@ -79,7 +79,7 @@ class HaConfigRepairsDashboard extends SubscribeMixin(LitElement) {
|
|||
.header=${this.hass.localize("ui.panel.config.repairs.caption")}
|
||||
>
|
||||
<div slot="toolbar-icon">
|
||||
<ha-button-menu corner="BOTTOM_START" multi>
|
||||
<ha-button-menu multi>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -225,7 +225,6 @@ class HaSceneDashboard extends LitElement {
|
|||
></ha-icon-button>
|
||||
<ha-button-related-filter-menu
|
||||
slot="filter-menu"
|
||||
corner="BOTTOM_START"
|
||||
.narrow=${this.narrow}
|
||||
.hass=${this.hass}
|
||||
.value=${this._filterValue}
|
||||
|
|
|
@ -228,7 +228,6 @@ export class HaSceneEditor extends SubscribeMixin(
|
|||
: this.hass.localize("ui.panel.config.scene.editor.default_name")}
|
||||
>
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
slot="toolbar-icon"
|
||||
@action=${this._handleMenuAction}
|
||||
activatable
|
||||
|
|
|
@ -191,7 +191,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||
</mwc-button>
|
||||
`
|
||||
: ""}
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -227,7 +227,6 @@ class HaScriptPicker extends LitElement {
|
|||
></ha-icon-button>
|
||||
<ha-button-related-filter-menu
|
||||
slot="filter-menu"
|
||||
corner="BOTTOM_START"
|
||||
.narrow=${this.narrow}
|
||||
.hass=${this.hass}
|
||||
.value=${this._filterValue}
|
||||
|
|
|
@ -116,7 +116,7 @@ export class HaScriptTrace extends LitElement {
|
|||
`
|
||||
: ""}
|
||||
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -44,7 +44,7 @@ class HaConfigSectionStorage extends LitElement {
|
|||
>
|
||||
${this._hostInfo
|
||||
? html`
|
||||
<ha-button-menu corner="BOTTOM_START" slot="toolbar-icon">
|
||||
<ha-button-menu slot="toolbar-icon">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
|
|
|
@ -80,7 +80,7 @@ export class HuiCardOptions extends LitElement {
|
|||
@click=${this._cardUp}
|
||||
?disabled=${this.path![1] === 0}
|
||||
></ha-icon-button>
|
||||
<ha-button-menu corner="BOTTOM_START" @action=${this._handleAction}>
|
||||
<ha-button-menu @action=${this._handleAction}>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass!.localize(
|
||||
|
|
|
@ -165,7 +165,7 @@ class HUIRoot extends LitElement {
|
|||
.path=${mdiHelpCircle}
|
||||
></ha-icon-button>
|
||||
</a>
|
||||
<ha-button-menu corner="BOTTOM_START">
|
||||
<ha-button-menu>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass!.localize(
|
||||
|
@ -319,10 +319,7 @@ class HUIRoot extends LitElement {
|
|||
: ""}
|
||||
${this._showButtonMenu
|
||||
? html`
|
||||
<ha-button-menu
|
||||
corner="BOTTOM_START"
|
||||
slot="actionItems"
|
||||
>
|
||||
<ha-button-menu slot="actionItems">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass!.localize(
|
||||
|
|
|
@ -292,7 +292,7 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) {
|
|||
stateObj &&
|
||||
supportsFeature(stateObj, MediaPlayerEntityFeature.VOLUME_SET)
|
||||
? html`
|
||||
<ha-button-menu corner="BOTTOM_START" y="0" x="76">
|
||||
<ha-button-menu y="0" x="76">
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.path=${mdiVolumeHigh}
|
||||
|
@ -310,7 +310,7 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) {
|
|||
: ""
|
||||
}
|
||||
|
||||
<ha-button-menu corner="BOTTOM_START">
|
||||
<ha-button-menu >
|
||||
${
|
||||
this.narrow
|
||||
? html`
|
||||
|
|
Loading…
Reference in New Issue