stages/authenticator_validate: update autocomplete for code input

This commit is contained in:
Jens Langhammer 2021-02-19 16:00:59 +01:00
parent 1c1f9b6cb8
commit 277b4336d3
3 changed files with 12 additions and 6 deletions

View file

@ -19,7 +19,7 @@ class ValidationForm(forms.Form):
label=_("Please enter the token from your device."), label=_("Please enter the token from your device."),
widget=forms.TextInput( widget=forms.TextInput(
attrs={ attrs={
"autocomplete": "off", "autocomplete": "one-time-code",
"placeholder": "123456", "placeholder": "123456",
"autofocus": "autofocus", "autofocus": "autofocus",
} }

View file

@ -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") @customElement("ak-notification-trigger")
export class NotificationRule extends LitElement { export class NotificationRule extends LitElement {
static get styles(): CSSResult[] {
return COMMON_STYLES;
}
constructor() { constructor() {
super(); super();
this.addEventListener("click", () => { this.addEventListener("click", () => {
@ -16,7 +21,8 @@ export class NotificationRule extends LitElement {
} }
render(): TemplateResult { render(): TemplateResult {
return html`<slot></slot>`; // TODO: Show icon with red dot when unread notifications exist
return html`<i class="fas fa-bell pf-c-dropdown__toggle-icon" aria-hidden="true"></i>`;
} }
} }

View file

@ -37,11 +37,11 @@ export class SidebarUser extends LitElement {
render(): TemplateResult { render(): TemplateResult {
return html` return html`
<a href="#/-/user/" class="pf-c-nav__link user-avatar" id="user-settings"> <a href="#/-/user/" class="pf-c-nav__link user-avatar" id="user-settings">
${until(User.me().then(u => { ${until(User.me().then((u) => {
return html`<img class="pf-c-avatar" src="${u.avatar}" alt="" />`;}), html``)} return html`<img class="pf-c-avatar" src="${u.avatar}" alt="" />`;
}), html``)}
</a> </a>
<ak-notification-trigger class="pf-c-nav__link user-notifications"> <ak-notification-trigger class="pf-c-nav__link user-notifications">
<i class="fas fa-bell pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
</ak-notification-trigger> </ak-notification-trigger>
<a href="/flows/-/default/invalidation/" class="pf-c-nav__link user-logout" id="logout"> <a href="/flows/-/default/invalidation/" class="pf-c-nav__link user-logout" id="logout">
<i class="fas fa-sign-out-alt" aria-hidden="true"></i> <i class="fas fa-sign-out-alt" aria-hidden="true"></i>