Skip to content

Commit 588041d

Browse files
committed
Formatting
1 parent 10ef904 commit 588041d

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

src/cards/form-card.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,11 @@ export class FormCard extends FormBaseCard implements LovelaceCard {
319319
></ha-form>
320320
${this._errorMsg ? html`<div class="error">${this._errorMsg}</div>` : nothing}
321321
<div class="card-actions">
322-
${this._config.hide_undo_button ?
323-
nothing :
324-
html`<ha-button @click=${this._resetChanges} .disabled=${!hasPendingChanges}>
325-
${this.hass.localize("ui.common.undo")}
326-
</ha-button>`
327-
}
322+
${this._config.hide_undo_button
323+
? nothing
324+
: html`<ha-button @click=${this._resetChanges} .disabled=${!hasPendingChanges}>
325+
${this.hass.localize("ui.common.undo")}
326+
</ha-button>`}
328327
<ha-progress-button @click=${this._handleSave}> ${save_label} </ha-progress-button>
329328
</div>
330329
</div>

src/cards/form-entity-row-editor.ts

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,55 +17,56 @@ import setupCustomlocalize from "../localize";
1717
import { computeActionsFormSchema } from "../shared/config";
1818

1919
const actions: UiAction[] = ["none", "perform-action"];
20-
const computeSchema = memoizeOne((t: LocalizeFunc): HaFormSchema[] => {
21-
return [
22-
{
23-
name: "entity",
24-
selector: { entity: {} },
25-
},
26-
{
27-
type: "grid",
28-
name: "",
29-
schema: [
30-
{
31-
name: "name",
32-
selector: { text: {} },
33-
},
34-
{
35-
name: "icon",
36-
selector: { icon: {} },
37-
context: {
38-
icon_entity: "entity",
20+
const computeSchema = memoizeOne(
21+
(t: LocalizeFunc): HaFormSchema[] =>
22+
[
23+
{
24+
name: "entity",
25+
selector: { entity: {} },
26+
},
27+
{
28+
type: "grid",
29+
name: "",
30+
schema: [
31+
{
32+
name: "name",
33+
selector: { text: {} },
3934
},
40-
},
41-
],
42-
},
43-
{
44-
name: "default",
45-
selector: { template: {} },
46-
},
47-
{
48-
name: "selector",
49-
selector: { selector: {} },
50-
},
51-
{
52-
type: "expandable",
53-
name: "",
54-
title: t("editor.form.actions_heading.title"),
55-
description: {
56-
suffix: t("editor.form.actions_heading.description"),
35+
{
36+
name: "icon",
37+
selector: { icon: {} },
38+
context: {
39+
icon_entity: "entity",
40+
},
41+
},
42+
],
5743
},
58-
icon: "mdi:playlist-edit",
59-
schema: [
60-
{
61-
name: "spread_values_to_data",
62-
selector: { boolean: {} },
44+
{
45+
name: "default",
46+
selector: { template: {} },
47+
},
48+
{
49+
name: "selector",
50+
selector: { selector: {} },
51+
},
52+
{
53+
type: "expandable",
54+
name: "",
55+
title: t("editor.form.actions_heading.title"),
56+
description: {
57+
suffix: t("editor.form.actions_heading.description"),
6358
},
64-
...computeActionsFormSchema("change_action", actions),
65-
],
66-
},
67-
] as const;
68-
});
59+
icon: "mdi:playlist-edit",
60+
schema: [
61+
{
62+
name: "spread_values_to_data",
63+
selector: { boolean: {} },
64+
},
65+
...computeActionsFormSchema("change_action", actions),
66+
],
67+
},
68+
] as const
69+
);
6970

7071
@customElement("form-entity-row-editor")
7172
export class FormEntityRowEditor extends LitElement implements LovelaceRowEditor {

0 commit comments

Comments
 (0)