Show title and name for default panels (#6941)

Fixes #6927
This commit is contained in:
Bram Kragten 2020-09-11 22:42:11 +02:00 committed by GitHub
parent 3fdd6a80f9
commit f01fe65be4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -651,11 +651,13 @@ class HaSidebar extends LitElement {
return panels.map((panel) =>
this._renderPanel(
panel.url_path,
panel.url_path === "lovelace"
? this.hass.localize("panel.states")
panel.url_path === this.hass.defaultPanel
? panel.title || this.hass.localize("panel.states")
: this.hass.localize(`panel.${panel.title}`) || panel.title,
panel.url_path === "lovelace" ? undefined : panel.icon,
panel.url_path === "lovelace" ? mdiViewDashboard : undefined
panel.icon,
panel.url_path === this.hass.defaultPanel && !panel.icon
? mdiViewDashboard
: undefined
)
);
}