aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorjloup <jloup@jloup.work>2018-05-14 12:38:00 +0200
committerjloup <jloup@jloup.work>2018-05-14 12:38:00 +0200
commita6820180928670b0642fa6a28ac221ce158230bb (patch)
treebe56c7282892ecd3d436d773fb21b6dc1230cc3c /cmd
parent2e4885d98ec49203180deb7e4e9148762e4720e7 (diff)
downloadFront-a6820180928670b0642fa6a28ac221ce158230bb.tar.gz
Front-a6820180928670b0642fa6a28ac221ce158230bb.tar.zst
Front-a6820180928670b0642fa6a28ac221ce158230bb.zip
JS clean.v0.0.15
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web/js/account.jsx10
-rw-r--r--cmd/web/js/change_password.jsx5
-rw-r--r--cmd/web/js/main.jsx1
-rw-r--r--cmd/web/js/otp.jsx5
-rw-r--r--cmd/web/js/panel.jsx2
-rw-r--r--cmd/web/js/password_reset.jsx5
-rw-r--r--cmd/web/js/signin.jsx19
-rw-r--r--cmd/web/js/signup.jsx9
-rw-r--r--cmd/web/static/style.css15
9 files changed, 47 insertions, 24 deletions
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 {
177 <div className="row"> 177 <div className="row">
178 <div className="col-12"> 178 <div className="col-12">
179 <form role="form" onSubmit={this.handleSubmit}> 179 <form role="form" onSubmit={this.handleSubmit}>
180 <label className="w-100">Key: 180 <label className="w-100">Key:</label>
181 <input className="form-control" type="text" placeholder="key" value={keyDisplayed} onChange={this.handleApiKeyChange} disabled={!this.props.editMode}/> 181 <input className="form-control" type="text" value={keyDisplayed} onChange={this.handleApiKeyChange} disabled={!this.props.editMode}/>
182 </label> 182 <label className="w-100">Secret:</label>
183 <label className="w-100">Secret: 183 <input className="form-control" type="text" value={secretDisplayed} onChange={this.handleApiSecretChange} disabled={!this.props.editMode}/>
184 <input className="form-control" type="text" placeholder="secret" value={secretDisplayed} onChange={this.handleApiSecretChange} disabled={!this.props.editMode}/>
185 </label>
186 <input className="form-control submit" type={submitType} value="Save" /> 184 <input className="form-control submit" type={submitType} value="Save" />
187 <button className="form-control submit" style={{display: buttonDisplay}} onSubmit={null} onClick={this.props.onEditClick} type="button">Show/Edit</button> 185 <button className="form-control submit" style={{display: buttonDisplay}} onSubmit={null} onClick={this.props.onEditClick} type="button">Show/Edit</button>
188 </form> 186 </form>
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 {
47 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); 47 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
48 return ( 48 return (
49 <div className="row sign-in"> 49 <div className="row sign-in">
50 <div className="offset-1 col-10 offset-md-4 col-md-4 text-center"> 50 <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
51 <form role="form" onSubmit={this.handleSubmit}> 51 <form role="form" onSubmit={this.handleSubmit}>
52 <input className="form-control" type="password" placeholder="password" onChange={this.handlePasswordChange} /> 52 <label className="w-100 text-left"><strong>New password</strong></label>
53 <input className="form-control" type="password" onChange={this.handlePasswordChange} />
53 <input className="form-control submit" type="submit" value="Change password" /> 54 <input className="form-control submit" type="submit" value="Change password" />
54 <div className={cName}>{this.state.msg}</div> 55 <div className={cName}>{this.state.msg}</div>
55 </form> 56 </form>
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) {
86 86
87App.page('/signout', true, function(context) { 87App.page('/signout', true, function(context) {
88 cookies.removeItem('jwt'); 88 cookies.removeItem('jwt');
89 cookies.removeItem('isAdmin');
89 90
90 App.go('/'); 91 App.go('/');
91}); 92});
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 {
61} 61}
62 return ( 62 return (
63 <div className="row otp-enroll"> 63 <div className="row otp-enroll">
64 <div className="offset-4 col-4 col-xs-offset-1 col-xs-10 text-center"> 64 <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
65 {qrCode} 65 {qrCode}
66 <div className="row justify-content-center"> 66 <div className="row justify-content-center">
67 <form role="form" onSubmit={this.handleSubmit}> 67 <form role="form" onSubmit={this.handleSubmit}>
68 <input className="form-control" type="pass" placeholder="code" onChange={this.handlePassChange} /> 68 <label className="w-100 text-left"><strong>Code</strong></label>
69 <input className="form-control" type="pass" onChange={this.handlePassChange} />
69 <input className="form-control submit" type="submit" value="Validate" /> 70 <input className="form-control submit" type="submit" value="Validate" />
70 <div className={cName}>{this.state.msg}</div> 71 <div className={cName}>{this.state.msg}</div>
71 </form> 72 </form>
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 {
11 11
12 return ( 12 return (
13 <div className={className}> 13 <div className={className}>
14 <div className="box col-12"> 14 <div className="box offset-1 col-10">
15 <div className="row"> 15 <div className="row">
16 <div className="col-4">{this.props.title}</div> 16 <div className="col-4">{this.props.title}</div>
17 </div> 17 </div>
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 {
42 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); 42 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
43 return ( 43 return (
44 <div className="row sign-in"> 44 <div className="row sign-in">
45 <div className="offset-1 col-10 offset-md-4 col-md-4 text-center"> 45 <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
46 <form role="form" onSubmit={this.handleSubmit}> 46 <form role="form" onSubmit={this.handleSubmit}>
47 <input className="form-control" type="email" placeholder="email" onChange={this.handleEmailChange} /> 47 <label className="w-100 text-left"><strong>Email address</strong></label>
48 <input className="form-control" type="email" onChange={this.handleEmailChange} />
48 <input className="form-control submit" type="submit" value="Reset" /> 49 <input className="form-control submit" type="submit" value="Reset" />
49 <div className={cName}>{this.state.msg}</div> 50 <div className={cName}>{this.state.msg}</div>
50 </form> 51 </form>
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 {
43 render = () => { 43 render = () => {
44 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); 44 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
45 return ( 45 return (
46 <React.Fragment>
46 <div className="row sign-in"> 47 <div className="row sign-in">
47 <div className="offset-1 col-10 offset-md-4 col-md-4 text-center"> 48 <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
48 <form role="form" onSubmit={this.handleSubmit}> 49 <form role="form" onSubmit={this.handleSubmit}>
49 <input className="form-control" type="email" placeholder="email" onChange={this.handleEmailChange} /> 50 <label className="w-100 text-left"><strong>Email address</strong></label>
50 <input className="form-control" type="password" placeholder="password" onChange={this.handlePasswordChange} /> 51 <input className="form-control" type="email" onChange={this.handleEmailChange} />
52 <span className="w-100 d-inline-block text-left">
53 <label><strong>Password</strong></label>
54 <a className="blue-link hint-text float-right" href="/reset-password">Forgot password?</a>
55 </span>
56 <input className="form-control" type="password" onChange={this.handlePasswordChange} />
51 <input className="form-control submit" type="submit" value="Sign In" /> 57 <input className="form-control submit" type="submit" value="Sign In" />
52 <div className={cName}>{this.state.msg}</div> 58 <div className={cName}>{this.state.msg}</div>
53 </form> 59 </form>
54 <a href="#" onClick={App.onInternNavigation.bind(this, '/signup')}><u>Sign up</u></a>
55 </div> 60 </div>
56 </div> 61 </div>
62 <div className="row">
63 <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
64 <span>New to CryptoPF? <a href="#" className="blue-link" onClick={App.onInternNavigation.bind(this, '/signup')}>Create an account.</a></span>
65 </div>
66 </div>
67 </React.Fragment>
57 ); 68 );
58 } 69 }
59} 70}
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 {
51 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk}); 51 var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
52 return ( 52 return (
53 <div className="row sign-in"> 53 <div className="row sign-in">
54 <div className="offset-1 col-10 offset-md-4 col-md-4 text-center"> 54 <div className="offset-1 box col-10 offset-md-4 col-md-4 text-center">
55 <form role="form" onSubmit={this.handleSubmit}> 55 <form role="form" onSubmit={this.handleSubmit}>
56 <input className="form-control" type="email" placeholder="email" onChange={this.handleEmailChange} /> 56 <label className="w-100 text-left"><strong>Email address</strong></label>
57 <input className="form-control" type="password" placeholder="password" onChange={this.handlePasswordChange} /> 57 <input className="form-control" type="email" onChange={this.handleEmailChange} />
58 <label className="w-100 text-left"><strong>Password</strong></label>
59 <input className="form-control" type="password" onChange={this.handlePasswordChange} />
58 <input className="form-control submit" type="submit" value="Sign Up" /> 60 <input className="form-control submit" type="submit" value="Sign Up" />
59 <div className={cName}>{this.state.msg}</div> 61 <div className={cName}>{this.state.msg}</div>
60 <a href="#" onClick={App.onInternNavigation.bind(this, '/signin')}><u>Sign In</u></a>
61 </form> 62 </form>
62 </div> 63 </div>
63 </div> 64 </div>
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 @@
3body { 3body {
4 font-family: 'Fira Mono', 'Helvetica Neue', Arial, Helvetica, sans-serif; 4 font-family: 'Fira Mono', 'Helvetica Neue', Arial, Helvetica, sans-serif;
5 background-color: rgb(246, 248, 251); 5 background-color: rgb(246, 248, 251);
6 font-size: 0.9em;
6} 7}
7 8
8ul { 9ul {
@@ -64,7 +65,6 @@ h1 {
64.sign-in .form-control { 65.sign-in .form-control {
65 margin-bottom: 20px; 66 margin-bottom: 20px;
66 border-radius: 2px; 67 border-radius: 2px;
67 border: none;
68 background-color: white; 68 background-color: white;
69} 69}
70 70
@@ -83,12 +83,21 @@ h1 {
83.sign-in .submit { 83.sign-in .submit {
84 background-color: rgb(20, 20, 20); 84 background-color: rgb(20, 20, 20);
85 color: white; 85 color: white;
86 font-weight: bold;
87}
88
89.blue-link {
90 color: #0366d6;
91}
92
93.hint-text {
94 font-size: 0.9em;
95 margin-top: 1px;
86} 96}
87 97
88.api-credentials-form .form-control { 98.api-credentials-form .form-control {
89 margin-bottom: 20px; 99 margin-bottom: 20px;
90 border-radius: 2px; 100 border-radius: 2px;
91 border: none;
92 background-color: white; 101 background-color: white;
93} 102}
94 103
@@ -100,13 +109,13 @@ h1 {
100.otp-enroll .form-control { 109.otp-enroll .form-control {
101 margin-bottom: 20px; 110 margin-bottom: 20px;
102 border-radius: 2px; 111 border-radius: 2px;
103 border: none;
104 background-color: white; 112 background-color: white;
105} 113}
106 114
107.otp-enroll .submit { 115.otp-enroll .submit {
108 background-color: rgb(20, 20, 20); 116 background-color: rgb(20, 20, 20);
109 color: white; 117 color: white;
118 font-weight: bold;
110} 119}
111.form-message { 120.form-message {
112 background-color: rgba(255, 6, 6, .33); 121 background-color: rgba(255, 6, 6, .33);