mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 00:36:34 +00:00
Lazy load iron page entries in config panel (#903)
This commit is contained in:
parent
6a5de599df
commit
35c8c70783
@ -39,19 +39,23 @@
|
|||||||
fallback-selection='not-found'
|
fallback-selection='not-found'
|
||||||
selected-attribute='visible'
|
selected-attribute='visible'
|
||||||
>
|
>
|
||||||
<ha-config-core
|
<template is="dom-if" if='[[_equals(_routeData.page, "core")]]' restamp>
|
||||||
page-name='core'
|
<ha-config-core
|
||||||
hass='[[hass]]'
|
page-name='core'
|
||||||
is-wide='[[isWide]]'
|
hass='[[hass]]'
|
||||||
></ha-config-core>
|
is-wide='[[isWide]]'
|
||||||
|
></ha-config-core>
|
||||||
|
</template>
|
||||||
|
|
||||||
<ha-config-cloud
|
<template is="dom-if" if='[[_equals(_routeData.page, "cloud")]]' restamp>
|
||||||
page-name='cloud'
|
<ha-config-cloud
|
||||||
route='[[route]]'
|
page-name='cloud'
|
||||||
hass='[[hass]]'
|
route='[[route]]'
|
||||||
is-wide='[[isWide]]'
|
hass='[[hass]]'
|
||||||
account='[[account]]'
|
is-wide='[[isWide]]'
|
||||||
></ha-config-cloud>
|
account='[[account]]'
|
||||||
|
></ha-config-cloud>
|
||||||
|
</template>
|
||||||
|
|
||||||
<ha-config-dashboard
|
<ha-config-dashboard
|
||||||
page-name='dashboard'
|
page-name='dashboard'
|
||||||
@ -62,36 +66,46 @@
|
|||||||
show-menu='[[showMenu]]'
|
show-menu='[[showMenu]]'
|
||||||
></ha-config-dashboard>
|
></ha-config-dashboard>
|
||||||
|
|
||||||
<ha-config-automation
|
<template is="dom-if" if='[[_equals(_routeData.page, "automation")]]' restamp>
|
||||||
page-name='automation'
|
<ha-config-automation
|
||||||
route='[[route]]'
|
page-name='automation'
|
||||||
hass='[[hass]]'
|
route='[[route]]'
|
||||||
is-wide='[[isWide]]'
|
hass='[[hass]]'
|
||||||
></ha-config-automation>
|
is-wide='[[isWide]]'
|
||||||
|
></ha-config-automation>
|
||||||
|
</template>
|
||||||
|
|
||||||
<ha-config-script
|
<template is="dom-if" if='[[_equals(_routeData.page, "script")]]' restamp>
|
||||||
page-name='script'
|
<ha-config-script
|
||||||
route='[[route]]'
|
page-name='script'
|
||||||
hass='[[hass]]'
|
route='[[route]]'
|
||||||
is-wide='[[isWide]]'
|
hass='[[hass]]'
|
||||||
></ha-config-script>
|
is-wide='[[isWide]]'
|
||||||
|
></ha-config-script>
|
||||||
|
</template>
|
||||||
|
|
||||||
<ha-config-zwave
|
<template is="dom-if" if='[[_equals(_routeData.page, "zwave")]]' restamp>
|
||||||
page-name='zwave'
|
<ha-config-zwave
|
||||||
hass='[[hass]]'
|
page-name='zwave'
|
||||||
is-wide='[[isWide]]'
|
hass='[[hass]]'
|
||||||
></ha-config-zwave>
|
is-wide='[[isWide]]'
|
||||||
|
></ha-config-zwave>
|
||||||
|
</template>
|
||||||
|
|
||||||
<ha-config-customize
|
<template is="dom-if" if='[[_equals(_routeData.page, "customize")]]' restamp>
|
||||||
page-name='customize'
|
<ha-config-customize
|
||||||
hass='[[hass]]'
|
page-name='customize'
|
||||||
is-wide='[[isWide]]'
|
hass='[[hass]]'
|
||||||
></ha-config-customize>
|
is-wide='[[isWide]]'
|
||||||
|
></ha-config-customize>
|
||||||
|
</template>
|
||||||
|
|
||||||
<ha-config-entries
|
<template is="dom-if" if='[[_equals(_routeData.page, "integrations")]]' restamp>
|
||||||
page-name='integrations'
|
<ha-config-entries
|
||||||
hass='[[hass]]'
|
page-name='integrations'
|
||||||
></ha-config-entries>
|
hass='[[hass]]'
|
||||||
|
></ha-config-entries>
|
||||||
|
</template>
|
||||||
|
|
||||||
<hass-error-screen
|
<hass-error-screen
|
||||||
page-name='not-found'
|
page-name='not-found'
|
||||||
@ -153,6 +167,10 @@ class HaPanelConfig extends window.hassMixins.EventsMixin(Polymer.Element) {
|
|||||||
this.fire('location-changed');
|
this.fire('location-changed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_equals(a, b) {
|
||||||
|
return a === b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customElements.define(HaPanelConfig.is, HaPanelConfig);
|
customElements.define(HaPanelConfig.is, HaPanelConfig);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user