From 70b2ff33654b99f87914424665e755173f655c44 Mon Sep 17 00:00:00 2001 From: yosilevy <37745463+yosilevy@users.noreply.github.com> Date: Sat, 23 Feb 2019 06:39:39 +0200 Subject: [PATCH] Fixed arrow in sub-page to use new arrows and fixed new button icon issues (#2807) * Fixed arrow in sub-page to use new arrows and fixed new button icon placement problem * Changed icon to text + added localization --- src/layouts/hass-subpage.ts | 5 ++-- src/panels/lovelace/hui-editor.ts | 39 ++++++++++++++++++++----------- src/translations/en.json | 6 +++++ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/layouts/hass-subpage.ts b/src/layouts/hass-subpage.ts index 8895df0e74..f318a7b47f 100644 --- a/src/layouts/hass-subpage.ts +++ b/src/layouts/hass-subpage.ts @@ -22,10 +22,9 @@ class HassSubpage extends LitElement { - + >
${this.header}
diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts index 02d5a395bd..d4570dcebe 100644 --- a/src/panels/lovelace/hui-editor.ts +++ b/src/panels/lovelace/hui-editor.ts @@ -53,17 +53,30 @@ class LovelaceFullConfigEditor extends LitElement { icon="hass:close" @click="${this._closeEditor}" > -
Edit Config
+
+ ${this.hass!.localize( + "ui.panel.lovelace.editor.raw_editor.header" + )} +
+
+ ${this._changed + ? this.hass!.localize( + "ui.panel.lovelace.editor.raw_editor.unsaved_changes" + ) + : this.hass!.localize( + "ui.panel.lovelace.editor.raw_editor.saved" + )} +
Save - + >${this.hass!.localize( + "ui.panel.lovelace.editor.raw_editor.save" + )}
@@ -115,13 +128,11 @@ class LovelaceFullConfigEditor extends LitElement { .save-button { opacity: 0; - margin-left: -21px; - transition: all 1.5s; + font-size: 14px; + padding: 0px 10px; } .saved { - margin-left: initial; - margin-right: -8px; opacity: 1; } `, diff --git a/src/translations/en.json b/src/translations/en.json index 6d5c5d6ab5..2ccba5ae95 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -897,6 +897,12 @@ "menu": { "raw_editor": "Raw config editor" }, + "raw_editor": { + "header": "Edit Config", + "save": "Save", + "unsaved_changes": "Unsaved changes", + "saved": "Saved" + }, "edit_view": { "header": "View Configuration", "add": "Add view",