From ee902062a71c1ef31176cf5061555618b288b1d4 Mon Sep 17 00:00:00 2001 From: jloup Date: Sun, 25 Feb 2018 21:11:38 +0100 Subject: [PATCH] Logout link. --- cmd/web/js/main.jsx | 41 +++++++++++++++++++++++++++++----------- cmd/web/js/otp.jsx | 1 + cmd/web/static/style.css | 10 ++++++++-- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/cmd/web/js/main.jsx b/cmd/web/js/main.jsx index 79bf976..c95c748 100644 --- a/cmd/web/js/main.jsx +++ b/cmd/web/js/main.jsx @@ -7,13 +7,32 @@ import Api from './api.js'; import cookies from './cookies.js'; import React from 'react'; +class Header extends React.Component { + render = () => { + if (this.props.displayLogout === true) { + return ; + } + return ; + + } +} + class Logo extends React.Component { render() { - return
- -
; + return ; } } @@ -24,7 +43,7 @@ App.page('/signup', false, function(context) { } App.mount(
- +
); }); @@ -36,7 +55,7 @@ App.page('/signin', false, function(context) { } App.mount(
- +
); }); @@ -49,14 +68,14 @@ App.page('/signout', true, function(context) { App.page('/me', true, function(context) { App.mount(
- +
); }); App.page('/not_confirmed', true, function(context) { App.mount(
- +

Please be patient, you account is being confirmed...

@@ -74,7 +93,7 @@ App.page('/otp/setup', true, function(context) { } App.mount(
- +
); @@ -83,7 +102,7 @@ App.page('/otp/setup', true, function(context) { App.page('/otp/validate', true, function(context) { App.mount(
- +
); }); diff --git a/cmd/web/js/otp.jsx b/cmd/web/js/otp.jsx index aecf032..6c22c8c 100644 --- a/cmd/web/js/otp.jsx +++ b/cmd/web/js/otp.jsx @@ -55,6 +55,7 @@ class OtpEnrollForm extends React.Component { if (this.props.img) { qrCode =
+

Please setup 2FA (Google Authenticator, Authy)

; } diff --git a/cmd/web/static/style.css b/cmd/web/static/style.css index bfa43f0..cdbcd06 100644 --- a/cmd/web/static/style.css +++ b/cmd/web/static/style.css @@ -32,14 +32,20 @@ i.cc { text-align: center; display: inline-block; color: white; - font-size: 28px; background-color: rgb(20, 20, 20); border-radius: 4px; font-weight: bold; padding: 10px 10px 10px 10px; vertical-align: middle; - margin-bottom: 30px; +} + +#header { margin-top: 20px; + margin-bottom: 30px; +} + +h1 { + font-size: 1.5em; } .sign-in .form-control { -- 2.41.0