From 337677ad12fdd31a112fde2016407955a9148e43 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 4 Nov 2021 15:21:04 +0100 Subject: [PATCH] web/flows: improve display of static tokens Signed-off-by: Jens Langhammer --- .../AuthenticatorStaticStage.ts | 40 +++++++++---------- web/src/locales/en.po | 5 ++- web/src/locales/fr_FR.po | 5 ++- web/src/locales/pseudo-LOCALE.po | 5 ++- 4 files changed, 30 insertions(+), 25 deletions(-) diff --git a/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts b/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts index adbb44bc8..22d16c781 100644 --- a/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts +++ b/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts @@ -22,21 +22,6 @@ import "../../../elements/forms/FormElement"; import "../../FormStatic"; import { BaseStage } from "../base"; -export const STATIC_TOKEN_STYLE = css` - /* Static OTP Tokens */ - .ak-otp-tokens { - list-style: circle; - columns: 2; - -webkit-columns: 2; - -moz-columns: 2; - margin-left: var(--pf-global--spacer--xs); - } - .ak-otp-tokens li { - font-size: var(--pf-global--FontSize--2xl); - font-family: monospace; - } -`; - @customElement("ak-stage-authenticator-static") export class AuthenticatorStaticStage extends BaseStage< AuthenticatorStaticChallenge, @@ -51,7 +36,21 @@ export class AuthenticatorStaticStage extends BaseStage< PFTitle, PFButton, AKGlobal, - STATIC_TOKEN_STYLE, + css` + /* Static OTP Tokens */ + ul { + list-style: circle; + columns: 2; + -webkit-columns: 2; + -moz-columns: 2; + margin-left: var(--pf-global--spacer--xs); + } + ul li { + font-size: var(--pf-global--FontSize--2xl); + font-family: monospace; + margin: 0 2rem; + } + `, ]; } @@ -80,17 +79,14 @@ export class AuthenticatorStaticStage extends BaseStage< > - -
    + +
      ${this.challenge.codes.map((token) => { return html`
    • ${token}
    • `; })}
    +

    ${t`Make sure to keep these tokens in a safe place.`}