From 67d8d48855c502617bd7a9daa9a922f778eb3525 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 18 Oct 2019 09:28:31 -0500 Subject: [PATCH] translate view editor and explain panel mode (#4043) --- .../editor/view-editor/hui-view-editor.ts | 37 +++++++++++++++++-- src/translations/en.json | 6 +++ 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index e2b7c330e9..71abdfe123 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -4,6 +4,8 @@ import { TemplateResult, customElement, property, + CSSResult, + css, } from "lit-element"; import "@polymer/paper-input/paper-input"; @@ -80,20 +82,32 @@ export class HuiViewEditor extends LitElement { ${configElementStyle}
Panel Mode?${this.hass.localize( + "ui.panel.lovelace.editor.view.panel_mode.title" + )} + ${this.hass.localize( + "ui.panel.lovelace.editor.view.panel_mode.description" + )}
`; @@ -147,6 +168,14 @@ export class HuiViewEditor extends LitElement { const config = { ...this._config, path: slugify(ev.currentTarget.value) }; fireEvent(this, "view-config-changed", { config }); } + + static get styles(): CSSResult { + return css` + .panel { + color: var(--secondary-text-color); + } + `; + } } declare global { diff --git a/src/translations/en.json b/src/translations/en.json index a302af1917..8889864451 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1532,6 +1532,12 @@ "weather-forecast": { "name": "Weather Forecast" } + }, + "view": { + "panel_mode": { + "title": "Panel Mode?", + "description": "This renders the first card at full width; other cards in this view will not be rendered." + } } }, "warning": {