From: jloup Date: Mon, 14 May 2018 10:38:00 +0000 (+0200) Subject: JS clean. X-Git-Tag: v0.0.15 X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FFront.git;a=commitdiff_plain;h=a6820180928670b0642fa6a28ac221ce158230bb JS clean. --- diff --git a/api/user.go b/api/user.go index ff539f0..8f1a465 100644 --- a/api/user.go +++ b/api/user.go @@ -136,13 +136,6 @@ func (q SignupQuery) Run() (interface{}, *Error) { } } - if CONFIG.FreeSMSUser != "" { - err := SendSMS(CONFIG.FreeSMSUser, CONFIG.FreeSMSPass, fmt.Sprintf("'%v' request a password reset. Token '/change-password?token=%v'", q.In.Email, token)) - if err != nil { - return nil, NewInternalError(err) - } - } - return SignResult{token, newUser.Role == db.RoleAdmin}, nil } diff --git a/cmd/web/js/account.jsx b/cmd/web/js/account.jsx index 988d840..9a976f4 100644 --- a/cmd/web/js/account.jsx +++ b/cmd/web/js/account.jsx @@ -177,12 +177,10 @@ class PoloniexCredentialsForm extends React.Component {
- - + + + +
diff --git a/cmd/web/js/change_password.jsx b/cmd/web/js/change_password.jsx index 74cde0f..dfa5701 100644 --- a/cmd/web/js/change_password.jsx +++ b/cmd/web/js/change_password.jsx @@ -47,9 +47,10 @@ class ChangePasswordForm extends React.Component { var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); return (
-
+
- + +
{this.state.msg}
diff --git a/cmd/web/js/main.jsx b/cmd/web/js/main.jsx index 8014377..a64b342 100644 --- a/cmd/web/js/main.jsx +++ b/cmd/web/js/main.jsx @@ -86,6 +86,7 @@ App.page('/confirm', false, function(context) { App.page('/signout', true, function(context) { cookies.removeItem('jwt'); + cookies.removeItem('isAdmin'); App.go('/'); }); diff --git a/cmd/web/js/otp.jsx b/cmd/web/js/otp.jsx index 6c22c8c..5f04e21 100644 --- a/cmd/web/js/otp.jsx +++ b/cmd/web/js/otp.jsx @@ -61,11 +61,12 @@ class OtpEnrollForm extends React.Component { } return (
-
+
{qrCode}
- + +
{this.state.msg}
diff --git a/cmd/web/js/panel.jsx b/cmd/web/js/panel.jsx index c293e9a..7f9f9a3 100644 --- a/cmd/web/js/panel.jsx +++ b/cmd/web/js/panel.jsx @@ -11,7 +11,7 @@ class Panel extends React.Component { return (
-
+
{this.props.title}
diff --git a/cmd/web/js/password_reset.jsx b/cmd/web/js/password_reset.jsx index b6a10ec..7193a93 100644 --- a/cmd/web/js/password_reset.jsx +++ b/cmd/web/js/password_reset.jsx @@ -42,9 +42,10 @@ class PasswordResetForm extends React.Component { var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); return (
-
+
- + +
{this.state.msg}
diff --git a/cmd/web/js/signin.jsx b/cmd/web/js/signin.jsx index 5b3b661..cf486ad 100644 --- a/cmd/web/js/signin.jsx +++ b/cmd/web/js/signin.jsx @@ -43,17 +43,28 @@ class SigninForm extends React.Component { render = () => { var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); return ( +
-
+
- - + + + + + Forgot password? + +
{this.state.msg}
- Sign up
+
+
+ New to CryptoPF? Create an account. +
+
+ ); } } diff --git a/cmd/web/js/signup.jsx b/cmd/web/js/signup.jsx index 08509e8..15f9e88 100644 --- a/cmd/web/js/signup.jsx +++ b/cmd/web/js/signup.jsx @@ -51,13 +51,14 @@ class SignupForm extends React.Component { var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); return (
-
+
- - + + + +
{this.state.msg}
- Sign In
diff --git a/cmd/web/static/style.css b/cmd/web/static/style.css index ad718d7..1ba682b 100644 --- a/cmd/web/static/style.css +++ b/cmd/web/static/style.css @@ -3,6 +3,7 @@ body { font-family: 'Fira Mono', 'Helvetica Neue', Arial, Helvetica, sans-serif; background-color: rgb(246, 248, 251); + font-size: 0.9em; } ul { @@ -64,7 +65,6 @@ h1 { .sign-in .form-control { margin-bottom: 20px; border-radius: 2px; - border: none; background-color: white; } @@ -83,12 +83,21 @@ h1 { .sign-in .submit { background-color: rgb(20, 20, 20); color: white; + font-weight: bold; +} + +.blue-link { + color: #0366d6; +} + +.hint-text { + font-size: 0.9em; + margin-top: 1px; } .api-credentials-form .form-control { margin-bottom: 20px; border-radius: 2px; - border: none; background-color: white; } @@ -100,13 +109,13 @@ h1 { .otp-enroll .form-control { margin-bottom: 20px; border-radius: 2px; - border: none; background-color: white; } .otp-enroll .submit { background-color: rgb(20, 20, 20); color: white; + font-weight: bold; } .form-message { background-color: rgba(255, 6, 6, .33);