From bc5f1af22e6eace1a7d1cc5e3a34bd69a8825d31 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 19 Dec 2020 16:08:22 -0500 Subject: [PATCH] totp: default to remember, remove google authenticator anti-recommendation, add dark theme media query to 2FA layout --- lib/philomena_web/templates/layout/two_factor.html.slime | 1 + lib/philomena_web/templates/registration/totp/edit.html.slime | 4 +--- lib/philomena_web/templates/session/totp/new.html.slime | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/philomena_web/templates/layout/two_factor.html.slime b/lib/philomena_web/templates/layout/two_factor.html.slime index 945f697e..fc294fcd 100644 --- a/lib/philomena_web/templates/layout/two_factor.html.slime +++ b/lib/philomena_web/templates/layout/two_factor.html.slime @@ -7,6 +7,7 @@ html lang="en" title Two Factor Authentication - Derpibooru link rel="stylesheet" href=stylesheet_path(@conn, nil) + link rel="stylesheet" href=dark_stylesheet_path(@conn) media="(prefers-color-scheme: dark)" link rel="icon" href="/favicon.ico" type="image/x-icon" link rel="icon" href="/favicon.svg" type="image/svg+xml" diff --git a/lib/philomena_web/templates/registration/totp/edit.html.slime b/lib/philomena_web/templates/registration/totp/edit.html.slime index 86295465..9c95f2f8 100644 --- a/lib/philomena_web/templates/registration/totp/edit.html.slime +++ b/lib/philomena_web/templates/registration/totp/edit.html.slime @@ -101,9 +101,7 @@ h1 Two Factor Authentication a href="https://www.microsoft.com/en-us/store/p/microsoft-authenticator/9nblgggzmcj6" target="_blank" rel="noreferrer" | Windows Mobile | ) - ' Google Authenticator is - em> not - ' recommended. + h4 Pair application p ' Using the application of your choice, scan the QR code below or enter the following secret key: diff --git a/lib/philomena_web/templates/session/totp/new.html.slime b/lib/philomena_web/templates/session/totp/new.html.slime index 4c93e914..0c3bf9eb 100644 --- a/lib/philomena_web/templates/session/totp/new.html.slime +++ b/lib/philomena_web/templates/session/totp/new.html.slime @@ -6,7 +6,7 @@ h1 Two Factor Authentication = text_input f, :twofactor_token, class: "input", placeholder: "6-digit code", required: true, autofocus: true, autocomplete: "off" .field - => checkbox f, :remember_me, class: "input" + => checkbox f, :remember_me, class: "input", checked: true = label f, :remember_me, "Remember this device" = submit "Sign in", class: "button"