mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 23:36:36 +00:00
Delay removing of init skeleton.
This commit is contained in:
parent
f3d3724df7
commit
190911b261
@ -68,12 +68,6 @@ export default new Polymer({
|
|||||||
this.registerServiceWorker();
|
this.registerServiceWorker();
|
||||||
},
|
},
|
||||||
|
|
||||||
attached() {
|
|
||||||
// remove the HTML init message
|
|
||||||
const initMsg = document.getElementById('init');
|
|
||||||
initMsg.parentElement.removeChild(initMsg);
|
|
||||||
},
|
|
||||||
|
|
||||||
ready() {
|
ready() {
|
||||||
reactor.batch(() => {
|
reactor.batch(() => {
|
||||||
// if auth was given, tell the backend
|
// if auth was given, tell the backend
|
||||||
|
@ -2,6 +2,7 @@ import Polymer from '../polymer';
|
|||||||
import hass from '../util/home-assistant-js-instance';
|
import hass from '../util/home-assistant-js-instance';
|
||||||
|
|
||||||
import nuclearObserver from '../util/bound-nuclear-behavior';
|
import nuclearObserver from '../util/bound-nuclear-behavior';
|
||||||
|
import removeInitMsg from '../util/remove-init-message';
|
||||||
|
|
||||||
require('../components/ha-sidebar');
|
require('../components/ha-sidebar');
|
||||||
require('../layouts/partial-zone');
|
require('../layouts/partial-zone');
|
||||||
@ -113,6 +114,7 @@ export default new Polymer({
|
|||||||
},
|
},
|
||||||
|
|
||||||
attached() {
|
attached() {
|
||||||
|
removeInitMsg();
|
||||||
startUrlSync();
|
startUrlSync();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import hass from '../util/home-assistant-js-instance';
|
|||||||
|
|
||||||
import nuclearObserver from '../util/bound-nuclear-behavior';
|
import nuclearObserver from '../util/bound-nuclear-behavior';
|
||||||
import validateAuth from '../util/validate-auth';
|
import validateAuth from '../util/validate-auth';
|
||||||
|
import removeInitMsg from '../util/remove-init-message';
|
||||||
|
|
||||||
const { authGetters } = hass;
|
const { authGetters } = hass;
|
||||||
|
|
||||||
@ -54,6 +55,10 @@ export default new Polymer({
|
|||||||
'validatingChanged(isValidating, isInvalid)',
|
'validatingChanged(isValidating, isInvalid)',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
attached() {
|
||||||
|
removeInitMsg();
|
||||||
|
},
|
||||||
|
|
||||||
computeShowSpinner(forceShowLoading, isValidating) {
|
computeShowSpinner(forceShowLoading, isValidating) {
|
||||||
return forceShowLoading || isValidating;
|
return forceShowLoading || isValidating;
|
||||||
},
|
},
|
||||||
|
7
src/util/remove-init-message.js
Normal file
7
src/util/remove-init-message.js
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user