Skip to content

Commit

Permalink
Added PR #1150 by @PhilPinsdorf
Browse files Browse the repository at this point in the history
Adding live-update mode to Pop-Up Slider Headers fixing #1149
  • Loading branch information
Clooos authored Jan 21, 2025
1 parent d9afda9 commit 10a736c
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 98 deletions.
174 changes: 88 additions & 86 deletions dist/bubble-card.js

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions src/editor/bubble-card-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,18 +780,6 @@ class BubbleCardEditor extends LitElement {
></ha-textfield>
${this.makeDropdown("Optional - Icon", "icon")}
${this.makeShowState()}
<ha-formfield .label="Optional - Slider live update" style="display: ${this._button_type !== 'slider' ? 'none' : ''}">
<ha-switch
aria-label="Optional - Slider live update"
.checked=${this._slider_live_update}
.configValue="${"slider_live_update"}"
@change=${this._valueChanged}
></ha-switch>
<div class="mdc-form-field">
<label class="mdc-label">Optional - Slider live update</label>
</div>
</ha-formfield>
<ha-alert style="display: ${this._button_type !== 'slider' ? 'none' : ''}" alert-type="info">By default, sliders are updated only on release. You can toggle this option to enable live updates while sliding.</ha-alert>
</div>
</ha-expansion-panel>
<ha-expansion-panel outlined>
Expand Down Expand Up @@ -1650,6 +1638,20 @@ class BubbleCardEditor extends LitElement {
</div>
</ha-formfield>
` : ''}
${array !== 'sub_button' && this._button_type === 'slider' ? html`
<ha-formfield .label="Optional - Slider live update">
<ha-switch
aria-label="Optional - Slider live update"
.checked=${this._slider_live_update}
.configValue="${"slider_live_update"}"
@change=${this._valueChanged}
></ha-switch>
<div class="mdc-form-field">
<label class="mdc-label">Optional - Slider live update</label>
</div>
</ha-formfield>
<ha-alert alert-type="info">By default, sliders are updated only on release. You can toggle this option to enable live updates while sliding.</ha-alert>
` : ''}
`;
}

Expand Down

0 comments on commit 10a736c

Please sign in to comment.