Fix SU sidebar issues (#10757)

This commit is contained in:
Joakim Sørensen 2021-12-02 17:31:09 +01:00 committed by GitHub
parent cea1a62867
commit 6494177821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -370,9 +370,7 @@ class HaSidebar extends LitElement {
private _renderPanels(panels: PanelInfo[]) {
return panels.map((panel) =>
this._renderPanel(
panel.url_path === "hassio"
? "config/dashboard?focusedPath=hassio"
: panel.url_path,
panel.url_path,
panel.url_path === this.hass.defaultPanel
? panel.title || this.hass.localize("panel.states")
: this.hass.localize(`panel.${panel.title}`) || panel.title,
@ -395,7 +393,11 @@ class HaSidebar extends LitElement {
return html`
<a
aria-role="option"
href=${`/${urlPath}`}
href=${`/${
urlPath === "hassio"
? "config/dashboard/?focusedPath=hassio"
: urlPath
}`}
data-panel=${urlPath}
tabindex="-1"
@mouseenter=${this._itemMouseEnter}

View File

@ -28,7 +28,7 @@ class HaConfigNavigation extends LitElement {
@property() public focusedPath?: string | null;
protected firstUpdated(changedProps: PropertyValues) {
protected updated(changedProps: PropertyValues) {
super.firstUpdated(changedProps);
if (!this.focusedPath) {
return;