mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +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();
|
||||
},
|
||||
|
||||
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,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();
|
||||
},
|
||||
|
||||
|
@ -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
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