1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-07-15 02:02:50 +01:00

Delay removing of init skeleton.

This commit is contained in:
Paulus Schoutsen
2015-12-17 19:41:26 -08:00
parent f3d3724df7
commit 190911b261
4 changed files with 14 additions and 6 deletions
-6
View File
@@ -68,12 +68,6 @@ export default new Polymer({
this.registerServiceWorker();
},
attached() {
// remove the HTML init message
const initMsg = document.getElementById('init');
initMsg.parentElement.removeChild(initMsg);
},
ready() {
reactor.batch(() => {
// if auth was given, tell the backend
+2
View File
@@ -2,6 +2,7 @@ import Polymer from '../polymer';
import hass from '../util/home-assistant-js-instance';
import nuclearObserver from '../util/bound-nuclear-behavior';
import removeInitMsg from '../util/remove-init-message';
require('../components/ha-sidebar');
require('../layouts/partial-zone');
@@ -113,6 +114,7 @@ export default new Polymer({
},
attached() {
removeInitMsg();
startUrlSync();
},
+5
View File
@@ -4,6 +4,7 @@ import hass from '../util/home-assistant-js-instance';
import nuclearObserver from '../util/bound-nuclear-behavior';
import validateAuth from '../util/validate-auth';
import removeInitMsg from '../util/remove-init-message';
const { authGetters } = hass;
@@ -54,6 +55,10 @@ export default new Polymer({
'validatingChanged(isValidating, isInvalid)',
],
attached() {
removeInitMsg();
},
computeShowSpinner(forceShowLoading, isValidating) {
return forceShowLoading || isValidating;
},
+7
View File
@@ -0,0 +1,7 @@
export default function removeInitMessage() {
// remove the HTML init message
const initMsg = document.getElementById('ha-init-skeleton');
if (initMsg) {
initMsg.parentElement.removeChild(initMsg);
}
}