From 42019bf67db7e85f7851c81e3b75841158f4c4a5 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sat, 21 Oct 2017 23:23:32 +0200 Subject: [PATCH] Improve UX of the TOTP registration page Mainly add badges and links to Google Play and Apple Store to get Google Authenticator. --- client/src/css/02-login.css | 2 +- client/src/css/03-totp-register.css | 28 +- client/src/img/stores/applestore-badge.svg | 129 +++++++ client/src/img/stores/googleplay-badge.svg | 429 +++++++++++++++++++++ server/src/views/totp-register.pug | 15 +- 5 files changed, 592 insertions(+), 11 deletions(-) create mode 100644 client/src/img/stores/applestore-badge.svg create mode 100644 client/src/img/stores/googleplay-badge.svg diff --git a/client/src/css/02-login.css b/client/src/css/02-login.css index 6a6e34ded..9f17de7b6 100644 --- a/client/src/css/02-login.css +++ b/client/src/css/02-login.css @@ -63,7 +63,7 @@ { text-align: center; margin: 10px 10px; - margin-top: 30px; + margin-top: 20px; font-size: 1.3em; } .account-wall .form-inputs diff --git a/client/src/css/03-totp-register.css b/client/src/css/03-totp-register.css index b51fa6dba..ebd243a77 100644 --- a/client/src/css/03-totp-register.css +++ b/client/src/css/03-totp-register.css @@ -1,12 +1,26 @@ .totp-register #secret { - background-color: white; - font-size: 0.9em; - font-weight: bold; - padding: 5px; - border: 1px solid #c7c7c7; - word-wrap: break-word; + background-color: white; + font-size: 0.9em; + font-weight: bold; + padding: 5px; + border: 1px solid #c7c7c7; + word-wrap: break-word; } .totp-register #qrcode img { - margin: 20px auto; + margin: 20px auto; +} + +.totp-register .need-google-authenticator { + text-align: center; + margin: 20px; +} + +.totp-register .store-badges { + margin-top: 5px; +} + +.totp-register .store-badge { + width: 110px; + height: 30px; } \ No newline at end of file diff --git a/client/src/img/stores/applestore-badge.svg b/client/src/img/stores/applestore-badge.svg new file mode 100644 index 000000000..ac111e597 --- /dev/null +++ b/client/src/img/stores/applestore-badge.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/img/stores/googleplay-badge.svg b/client/src/img/stores/googleplay-badge.svg new file mode 100644 index 000000000..9e33e3aa2 --- /dev/null +++ b/client/src/img/stores/googleplay-badge.svg @@ -0,0 +1,429 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/server/src/views/totp-register.pug b/server/src/views/totp-register.pug index 443804fba..1eeadb319 100644 --- a/server/src/views/totp-register.pug +++ b/server/src/views/totp-register.pug @@ -4,13 +4,22 @@ block variables - page_classname = "totp-register"; block form-header -

TOTP Secret

-

Insert your secret in Google Authenticator

+

One-time passwords

+

Open Google Authenticator and add this entry

block content p(id="secret") #{ base32_secret } + p Or scan this barcode div(id="qrcode") #{ otpauth_url } -

Login

+ p + a(href=login_endpoint, id="login-button") Login + div(class="need-google-authenticator") + | Need Google Authenticator? + div(class="store-badges") + a(href='https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1', target="_blank") + img(alt='Get it on Google Play', src='/img/stores/googleplay-badge.svg', class="store-badge") + a(href='https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8', target="_blank") + img(alt='Get it on Apple Store' src='/img/stores/applestore-badge.svg' class="store-badge") block entrypoint