mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 06:16:33 +00:00
Render choose and if action correctly on mobile (#25411)
This commit is contained in:
parent
42c8d132bf
commit
193caec2df
@ -18,6 +18,8 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
||||
|
||||
@property({ attribute: false }) public action!: ChooseAction;
|
||||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@state() private _showDefault = false;
|
||||
|
||||
public static get defaultConfig(): ChooseAction {
|
||||
@ -35,6 +37,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
||||
.disabled=${this.disabled}
|
||||
@value-changed=${this._optionsChanged}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
></ha-automation-option>
|
||||
|
||||
${this._showDefault || action.default
|
||||
@ -49,6 +52,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
||||
.disabled=${this.disabled}
|
||||
@value-changed=${this._defaultChanged}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
></ha-automation-action>
|
||||
`
|
||||
: html`
|
||||
|
@ -18,6 +18,8 @@ export class HaIfAction extends LitElement implements ActionElement {
|
||||
|
||||
@property({ attribute: false }) public action!: IfAction;
|
||||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
@state() private _showElse = false;
|
||||
|
||||
public static get defaultConfig(): IfAction {
|
||||
@ -41,6 +43,7 @@ export class HaIfAction extends LitElement implements ActionElement {
|
||||
.disabled=${this.disabled}
|
||||
@value-changed=${this._ifChanged}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
></ha-automation-condition>
|
||||
|
||||
<h3>
|
||||
@ -53,6 +56,7 @@ export class HaIfAction extends LitElement implements ActionElement {
|
||||
.disabled=${this.disabled}
|
||||
@value-changed=${this._thenChanged}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
></ha-automation-action>
|
||||
${this._showElse || action.else
|
||||
? html`
|
||||
@ -66,6 +70,7 @@ export class HaIfAction extends LitElement implements ActionElement {
|
||||
.disabled=${this.disabled}
|
||||
@value-changed=${this._elseChanged}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
></ha-automation-action>
|
||||
`
|
||||
: html` <div class="link-button-row">
|
||||
|
@ -183,6 +183,7 @@ export default class HaAutomationOptionRow extends LitElement {
|
||||
)}
|
||||
.disabled=${this.disabled}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
@value-changed=${this._conditionChanged}
|
||||
></ha-automation-condition>
|
||||
<h4>
|
||||
@ -194,6 +195,7 @@ export default class HaAutomationOptionRow extends LitElement {
|
||||
.actions=${ensureArray(this.option.sequence) || []}
|
||||
.disabled=${this.disabled}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
@value-changed=${this._actionChanged}
|
||||
></ha-automation-action>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user