From 277b4336d31f7bea2bc3c8e86c4e4bfa2b44675c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 19 Feb 2021 16:00:59 +0100 Subject: [PATCH] stages/authenticator_validate: update autocomplete for code input --- authentik/stages/authenticator_validate/forms.py | 2 +- web/src/elements/notifications/NotificationTrigger.ts | 10 ++++++++-- web/src/elements/sidebar/SidebarUser.ts | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/authentik/stages/authenticator_validate/forms.py b/authentik/stages/authenticator_validate/forms.py index 23e87fba0..bdc4c9316 100644 --- a/authentik/stages/authenticator_validate/forms.py +++ b/authentik/stages/authenticator_validate/forms.py @@ -19,7 +19,7 @@ class ValidationForm(forms.Form): label=_("Please enter the token from your device."), widget=forms.TextInput( attrs={ - "autocomplete": "off", + "autocomplete": "one-time-code", "placeholder": "123456", "autofocus": "autofocus", } diff --git a/web/src/elements/notifications/NotificationTrigger.ts b/web/src/elements/notifications/NotificationTrigger.ts index db7f581e0..842a18c2e 100644 --- a/web/src/elements/notifications/NotificationTrigger.ts +++ b/web/src/elements/notifications/NotificationTrigger.ts @@ -1,8 +1,13 @@ -import { customElement, html, LitElement, TemplateResult } from "lit-element"; +import { CSSResult, customElement, html, LitElement, TemplateResult } from "lit-element"; +import { COMMON_STYLES } from "../../common/styles"; @customElement("ak-notification-trigger") export class NotificationRule extends LitElement { + static get styles(): CSSResult[] { + return COMMON_STYLES; + } + constructor() { super(); this.addEventListener("click", () => { @@ -16,7 +21,8 @@ export class NotificationRule extends LitElement { } render(): TemplateResult { - return html``; + // TODO: Show icon with red dot when unread notifications exist + return html``; } } diff --git a/web/src/elements/sidebar/SidebarUser.ts b/web/src/elements/sidebar/SidebarUser.ts index 73c79f188..01a75d470 100644 --- a/web/src/elements/sidebar/SidebarUser.ts +++ b/web/src/elements/sidebar/SidebarUser.ts @@ -37,11 +37,11 @@ export class SidebarUser extends LitElement { render(): TemplateResult { return html` - ${until(User.me().then(u => { - return html``;}), html``)} + ${until(User.me().then((u) => { + return html``; + }), html``)} -