From 1d1e65b1cb21acbc5139c2422740659952d135c8 Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Tue, 13 Oct 2020 11:13:54 +0200 Subject: [PATCH 1/2] Add warning to badge preview in "Panel Mode" --- .../editor/view-editor/hui-dialog-edit-view.ts | 13 +++++++++++++ src/translations/en.json | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 0c0e38cb7077..147618e265d7 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -127,6 +127,15 @@ export class HuiDialogEditView extends LitElement { `; })} + ${this._config?.panel + ? html` +

+ ${this.hass!.localize( + "ui.panel.lovelace.editor.edit_badges.panel_mode" + )} +

+ ` + : ""} ` : ""} Date: Tue, 13 Oct 2020 13:02:00 +0200 Subject: [PATCH 2/2] Move warning to the top --- .../editor/view-editor/hui-dialog-edit-view.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 147618e265d7..d4b1eafcedb6 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -117,6 +117,15 @@ export class HuiDialogEditView extends LitElement { content = html` ${this._badges?.length ? html` + ${this._config?.panel + ? html` +

+ ${this.hass!.localize( + "ui.panel.lovelace.editor.edit_badges.panel_mode" + )} +

+ ` + : ""}
${this._badges.map((badgeConfig) => { return html` @@ -127,15 +136,6 @@ export class HuiDialogEditView extends LitElement { `; })}
- ${this._config?.panel - ? html` -

- ${this.hass!.localize( - "ui.panel.lovelace.editor.edit_badges.panel_mode" - )} -

- ` - : ""} ` : ""}