Fix store auth disappearing (#9312)

This commit is contained in:
Bram Kragten 2021-06-01 00:35:51 +02:00 committed by GitHub
parent 2eb35668fa
commit a930e2dc75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -50,6 +50,9 @@ class HaStoreAuth extends LitElement {
bottom: 16px;
right: 16px;
transition: bottom 0.25s;
--ha-card-box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2),
0px 6px 10px 0px rgba(0, 0, 0, 0.14),
0px 1px 18px 0px rgba(0, 0, 0, 0.12);
}
.card-actions {

View File

@ -33,7 +33,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
.then(() => {
const el = document.createElement("ha-store-auth-card");
this.provideHass(el);
this.shadowRoot!.appendChild(el);
document.body.appendChild(el);
});
}
}

View File

@ -39,13 +39,12 @@ export const registerServiceWorker = async (
}
// Notify users a new frontend is available.
// When
showToast(rootEl, {
message: "A new version of the frontend is available.",
action: {
// We tell the service worker to call skipWaiting, which activates
// the new service worker. Above we listen for `controllerchange`
// so we reload the page once a new servic worker activates.
// so we reload the page once a new service worker activates.
action: () => installingWorker.postMessage({ type: "skipWaiting" }),
text: "reload",
},