mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
No idea, but it seems to work? (#2526)
This commit is contained in:
parent
0e1eaa18df
commit
9a86b06092
@ -50,11 +50,13 @@ export class HomeAssistant extends ext(PolymerElement, [
|
|||||||
route="[[route]]"
|
route="[[route]]"
|
||||||
pattern="/:panel"
|
pattern="/:panel"
|
||||||
data="{{routeData}}"
|
data="{{routeData}}"
|
||||||
|
tail="{{subroute}}"
|
||||||
></app-route>
|
></app-route>
|
||||||
<template is="dom-if" if="[[showMain]]" restamp>
|
<template is="dom-if" if="[[showMain]]" restamp>
|
||||||
<home-assistant-main
|
<home-assistant-main
|
||||||
hass="[[hass]]"
|
hass="[[hass]]"
|
||||||
route="[[route]]"
|
route="[[route]]"
|
||||||
|
tail="[[subroute]]"
|
||||||
></home-assistant-main>
|
></home-assistant-main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -81,6 +81,9 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
return {
|
return {
|
||||||
hass: Object,
|
hass: Object,
|
||||||
narrow: Boolean,
|
narrow: Boolean,
|
||||||
|
tail: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
route: {
|
route: {
|
||||||
type: Object,
|
type: Object,
|
||||||
observer: "_routeChanged",
|
observer: "_routeChanged",
|
||||||
@ -135,7 +138,7 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
if (this.route.prefix === "") {
|
if (this.tail.prefix === "") {
|
||||||
this.navigate(`/${localStorage.defaultPage || DEFAULT_PANEL}`, true);
|
this.navigate(`/${localStorage.defaultPage || DEFAULT_PANEL}`, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user