From 7e74502ba33f6803dd89c4f8e5b1eb56a16e38db Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 4 Dec 2023 11:34:42 +0100 Subject: [PATCH] Add particles to login, move forgot password link (#18868) --- src/auth/ha-authorize.ts | 4 + src/auth/ha-local-auth-flow.ts | 136 +++++++++++---------- src/onboarding/ha-onboarding.ts | 2 +- src/{onboarding => resources}/particles.ts | 2 +- 4 files changed, 78 insertions(+), 66 deletions(-) rename src/{onboarding => resources}/particles.ts (96%) diff --git a/src/auth/ha-authorize.ts b/src/auth/ha-authorize.ts index 5d5db5fc44..24ae1f190c 100644 --- a/src/auth/ha-authorize.ts +++ b/src/auth/ha-authorize.ts @@ -279,6 +279,10 @@ export class HaAuthorize extends litLocalizeLiteMixin(LitElement) { ); } + if (window.innerWidth > 450) { + import("../resources/particles"); + } + // If we are logging into the instance that is hosting this auth form // we will register the service worker to start preloading. if (url.host === location.host) { diff --git a/src/auth/ha-local-auth-flow.ts b/src/auth/ha-local-auth-flow.ts index 9ae8035684..da0de307df 100644 --- a/src/auth/ha-local-auth-flow.ts +++ b/src/auth/ha-local-auth-flow.ts @@ -154,6 +154,10 @@ export class HaLocalAuthFlow extends LitElement { ha-button { --mdc-typography-button-text-transform: none; } + .forgot-password-container { + text-align: right; + padding: 8px 0 16px 0; + } a.forgot-password { color: var(--primary-color); text-decoration: none; @@ -177,7 +181,7 @@ export class HaLocalAuthFlow extends LitElement { ${this._error ? html`${this._error}` - : ""} + : nothing} ${this._step ? html`` : this._selectedUser - ? html`
- -

${this._persons[this._selectedUser].name}

-
-
- - - - -
-
- - ${this.localize("ui.panel.page-authorize.form.previous")} - - - ${this.localize("ui.panel.page-authorize.form.next")} - + ? html`