mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Cleanup of picture
card editor (#2364)
* Cleanup of `picture` card editor * Fix `action-editor`
This commit is contained in:
parent
4c5d3138c1
commit
0a2eaec884
@ -34,7 +34,7 @@ export class HuiActionEditor extends LitElement {
|
||||
protected hass?: HomeAssistant;
|
||||
|
||||
static get properties(): PropertyDeclarations {
|
||||
return { hass: {}, config: {} };
|
||||
return { hass: {}, config: {}, label: {}, actions: {} };
|
||||
}
|
||||
|
||||
get _action(): string {
|
||||
|
@ -44,7 +44,7 @@ export class HuiPictureCardEditor extends hassLocalizeLitMixin(LitElement)
|
||||
}
|
||||
|
||||
get _tap_action(): ActionConfig {
|
||||
return this._config!.tap_action || { action: "more-info" };
|
||||
return this._config!.tap_action || { action: "none" };
|
||||
}
|
||||
|
||||
get _hold_action(): ActionConfig {
|
||||
@ -56,6 +56,8 @@ export class HuiPictureCardEditor extends hassLocalizeLitMixin(LitElement)
|
||||
return html``;
|
||||
}
|
||||
|
||||
const actions = ["navigate", "call-service", "none"];
|
||||
|
||||
return html`
|
||||
${configElementStyle}
|
||||
<div class="card-config">
|
||||
@ -70,15 +72,15 @@ export class HuiPictureCardEditor extends hassLocalizeLitMixin(LitElement)
|
||||
label="Tap Action"
|
||||
.hass="${this.hass}"
|
||||
.config="${this._tap_action}"
|
||||
.actions="${["navigate", "call-service", "none"]}"
|
||||
.actions="${actions}"
|
||||
.configValue="${"tap_action"}"
|
||||
@action-changed="${this._valueChanged}"
|
||||
></hui-action-editor>
|
||||
<hui-action-editor
|
||||
label=Hold Action"
|
||||
label="Hold Action"
|
||||
.hass="${this.hass}"
|
||||
.config="${this._hold_action}"
|
||||
.actions="${["navigate", "call-service", "none"]}"
|
||||
.actions="${actions}"
|
||||
.configValue="${"hold_action"}"
|
||||
@action-changed="${this._valueChanged}"
|
||||
></hui-action-editor>
|
||||
|
Loading…
x
Reference in New Issue
Block a user