From a930e2dc75f84851ee1b4a2ff77b918dbc65ccfe Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 1 Jun 2021 00:35:51 +0200 Subject: [PATCH] Fix store auth disappearing (#9312) --- src/dialogs/ha-store-auth-card.ts | 3 +++ src/state/auth-mixin.ts | 2 +- src/util/register-service-worker.ts | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dialogs/ha-store-auth-card.ts b/src/dialogs/ha-store-auth-card.ts index b3229bfa73..6d7e5d3e8f 100644 --- a/src/dialogs/ha-store-auth-card.ts +++ b/src/dialogs/ha-store-auth-card.ts @@ -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 { diff --git a/src/state/auth-mixin.ts b/src/state/auth-mixin.ts index 7800ce8433..21575adc33 100644 --- a/src/state/auth-mixin.ts +++ b/src/state/auth-mixin.ts @@ -33,7 +33,7 @@ export default >(superClass: T) => .then(() => { const el = document.createElement("ha-store-auth-card"); this.provideHass(el); - this.shadowRoot!.appendChild(el); + document.body.appendChild(el); }); } } diff --git a/src/util/register-service-worker.ts b/src/util/register-service-worker.ts index 709c8f2a6c..1a029f97d0 100644 --- a/src/util/register-service-worker.ts +++ b/src/util/register-service-worker.ts @@ -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", },