@@ -13,7 +13,6 @@ class LoginContent extends React.Component {
1313
1414 loginUser ( e ) {
1515 e . preventDefault ( ) ;
16- console . log ( this )
1716 let user = {
1817 username : this . refs . username . value ,
1918 password : this . refs . password . value ,
@@ -26,62 +25,65 @@ class LoginContent extends React.Component {
2625 data : JSON . stringify ( user ) ,
2726 success : ( resp ) => {
2827 console . log ( resp ) ;
29- if ( resp . success === true ) {
30- browserHistory . push ( "/" )
31- }
28+ browserHistory . push ( "/" ) ;
3229 }
33- } )
30+ } ) ;
31+ setTimeout ( ( ) => {
32+ browserHistory . push ( "/" ) ;
33+ } , 1000 ) ;
3434 }
3535
3636 render ( ) {
3737 return (
38- < div className = "container center-block " >
38+ < div className = "container " >
3939 < div className = "row" >
40- < div className = "col-xs-6" >
41- < div className = "center-block" >
42- < section className = "content-header" >
43- < h1 >
44- Login
45- < small > Login to manage Factorio</ small >
46- </ h1 >
47- </ section >
40+ < div className = "absolute-center is-responsive" >
41+ < div className = "col-centered col-md-4 col-mod-offset-2" >
42+ < div className = "center-block" >
43+ < section className = "content-header" >
44+ < h1 >
45+ Factorio Server Manager
46+ < small > Login to manage Factorio</ small >
47+ </ h1 >
48+ </ section >
4849
49- < section className = "content" >
50- < div className = "row" >
51- < div className = "login-box-body" >
50+ < section className = "content" >
51+ < div className = "row" >
52+ < div className = "login-box-body" >
5253
53- < form onSubmit = { this . loginUser } >
54- < div className = "form-group has-feedback" >
55- < input type = "text" ref = "username" className = "form-control" placeholder = "Username" />
56- < span className = "fa fa-envelope form-control-feedback" > </ span >
57- </ div >
58- < div className = "form-group has-feedback" >
59- < input type = "password" ref = "password" className = "form-control" placeholder = "Password" />
60- < span className = "fa fa-lock form-control-feedback" > </ span >
61- </ div >
62- < div className = "row" >
63- < div className = "col-xs-8" >
64- < div className = "checkbox" >
65- < label className = "" >
66- < div className = "" aria-checked = "false" aria-disabled = "false" style = { { position : "relative" } } >
67- < input type = "checkbox" />
68- </ div > Remember Me
69- </ label >
54+ < form onSubmit = { this . loginUser } >
55+ < div className = "form-group has-feedback" >
56+ < input type = "text" ref = "username" className = "form-control" placeholder = "Username" />
57+ < span className = "fa fa-envelope form-control-feedback" > </ span >
7058 </ div >
71- </ div >
72- </ div >
73- < div className = "row" >
74- < div className = "col-xs-4" >
75- < button type = "submit" className = "btn btn-primary btn-block btn-flat" > Sign In</ button >
76- </ div >
77- </ div >
78- </ form >
59+ < div className = "form-group has-feedback" >
60+ < input type = "password" ref = "password" className = "form-control" placeholder = "Password" />
61+ < span className = "fa fa-lock form-control-feedback" > </ span >
62+ </ div >
63+ < div className = "row" >
64+ < div className = "col-xs-8" >
65+ < div className = "checkbox" >
66+ < label className = "" >
67+ < div className = "" aria-checked = "false" aria-disabled = "false" style = { { position : "relative" } } >
68+ < input type = "checkbox" />
69+ </ div > Remember Me
70+ </ label >
71+ </ div >
72+ </ div >
73+ </ div >
74+ < div className = "row" >
75+ < div className = "col-xs-4" >
76+ < button type = "submit" className = "btn btn-primary btn-block btn-flat" > Sign In</ button >
77+ </ div >
78+ </ div >
79+ </ form >
7980
80- < a href = "#" > I forgot my password</ a > < br />
81- </ div >
81+ < a href = "#" > I forgot my password</ a > < br />
82+ </ div >
83+ </ div >
84+ </ section >
85+ </ div >
8286 </ div >
83- </ section >
84- </ div >
8587 </ div >
8688 </ div >
8789 </ div >
0 commit comments