From a88321d2431ac0c86fdc33977094be17cf0ce596 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 16 Mar 2020 20:32:13 +0100 Subject: [PATCH] Only show url path field in advanced mode (#5233) --- .../dashboards/dialog-lovelace-dashboard-detail.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts b/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts index 6a87e7ec48..d090fa0bae 100644 --- a/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts +++ b/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts @@ -99,7 +99,9 @@ export class DialogLovelaceDashboardDetail extends LitElement { .label=${this.hass.localize( "ui.panel.config.lovelace.dashboards.detail.title" )} - @blur=${this._fillUrlPath} + @blur=${this.hass.userData?.showAdvanced + ? this._fillUrlPath + : undefined} .invalid=${titleInvalid} .errorMessage=${this.hass.localize( "ui.panel.config.lovelace.dashboards.detail.title_required" @@ -113,7 +115,7 @@ export class DialogLovelaceDashboardDetail extends LitElement { "ui.panel.config.lovelace.dashboards.detail.icon" )} > - ${!this._params.dashboard + ${!this._params.dashboard && this.hass.userData?.showAdvanced ? html` ) { this._error = undefined; this._title = ev.detail.value; + if (!this.hass.userData?.showAdvanced) { + this._fillUrlPath(); + } } private _fillUrlPath() { - if (this._urlPath || !this._title) { + if ((this.hass.userData?.showAdvanced && this._urlPath) || !this._title) { return; } const parts = this._title.toLowerCase().split(" ");