mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 22:06:34 +00:00
Fix SU sidebar issues (#10757)
This commit is contained in:
parent
cea1a62867
commit
6494177821
@ -370,9 +370,7 @@ class HaSidebar extends LitElement {
|
|||||||
private _renderPanels(panels: PanelInfo[]) {
|
private _renderPanels(panels: PanelInfo[]) {
|
||||||
return panels.map((panel) =>
|
return panels.map((panel) =>
|
||||||
this._renderPanel(
|
this._renderPanel(
|
||||||
panel.url_path === "hassio"
|
panel.url_path,
|
||||||
? "config/dashboard?focusedPath=hassio"
|
|
||||||
: panel.url_path,
|
|
||||||
panel.url_path === this.hass.defaultPanel
|
panel.url_path === this.hass.defaultPanel
|
||||||
? panel.title || this.hass.localize("panel.states")
|
? panel.title || this.hass.localize("panel.states")
|
||||||
: this.hass.localize(`panel.${panel.title}`) || panel.title,
|
: this.hass.localize(`panel.${panel.title}`) || panel.title,
|
||||||
@ -395,7 +393,11 @@ class HaSidebar extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<a
|
<a
|
||||||
aria-role="option"
|
aria-role="option"
|
||||||
href=${`/${urlPath}`}
|
href=${`/${
|
||||||
|
urlPath === "hassio"
|
||||||
|
? "config/dashboard/?focusedPath=hassio"
|
||||||
|
: urlPath
|
||||||
|
}`}
|
||||||
data-panel=${urlPath}
|
data-panel=${urlPath}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
@mouseenter=${this._itemMouseEnter}
|
@mouseenter=${this._itemMouseEnter}
|
||||||
|
@ -28,7 +28,7 @@ class HaConfigNavigation extends LitElement {
|
|||||||
|
|
||||||
@property() public focusedPath?: string | null;
|
@property() public focusedPath?: string | null;
|
||||||
|
|
||||||
protected firstUpdated(changedProps: PropertyValues) {
|
protected updated(changedProps: PropertyValues) {
|
||||||
super.firstUpdated(changedProps);
|
super.firstUpdated(changedProps);
|
||||||
if (!this.focusedPath) {
|
if (!this.focusedPath) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user