@@ -4,71 +4,185 @@ import {Link, browserHistory} from 'react-router';
44class HiddenSidebar extends React . Component {
55 constructor ( props ) {
66 super ( props ) ;
7- this . onLogout = this . onLogout . bind ( this ) ;
87 }
98
109 capitalizeFirstLetter ( string ) {
1110 return string . charAt ( 0 ) . toUpperCase ( ) + string . slice ( 1 ) ;
1211 }
1312
14- onLogout ( e ) {
15- e . preventDefault ( ) ;
16- $ . ajax ( {
17- url : "/api/logout" ,
18- dataType : "json" ,
19- success : ( resp ) => {
20- alert ( resp )
21- }
22- } ) ;
23- // Wait for 1 second for logout callback to complete
24- setTimeout ( ( ) => {
25- browserHistory . push ( "/login" ) ;
26- } , 1000 ) ;
27- }
28-
2913 render ( ) {
3014 var username ;
3115 if ( this . props . loggedIn ) {
3216 username = < p > { this . props . username } </ p >
3317 }
3418
3519 return (
36- < aside className = "control-sidebar control-sidebar-dark" >
37- < ul className = "control-sidebar-menu" >
20+ < aside id = "control-sidebar" className = "control-sidebar control-sidebar-dark" >
21+ < ul className = "nav nav-tabs nav-justified control-sidebar-tabs" >
22+ < li className = "active" > < a href = "control-sidebar-theme-demo-options-tab" data-toggle = "tab" > < i className = "fa fa-wrench" > </ i > </ a > </ li >
23+ < li > < a href = "#control-sidebar-home-tab" data-toggle = "tab" > < i className = "fa fa-home" > </ i > </ a > </ li >
24+ < li > < a href = "#control-sidebar-settings-tab" data-toggle = "tab" > < i className = "fa fa-gears" > </ i > </ a > </ li >
25+ </ ul >
26+ < div className = "tab-content" >
27+ < div className = "tab-pane" id = "control-sidebar-home-tab" >
28+ < h3 className = "control-sidebar-heading" > Recent Activity</ h3 >
29+ < ul className = "control-sidebar-menu" >
30+ < li >
31+ < Link to = "/login" activeClassName = "active" >
32+ < i className = "menu-icon fa fa-birthday-cake bg-red" > </ i >
33+
34+ < div className = "menu-info" >
35+ < i classNameName = "menu-icon fa fa-lock bg-green" > </ i >
36+ < h4 className = "control-sidebar-subheading" > Login</ h4 >
37+ </ div >
38+ </ Link >
39+ </ li >
40+ < li >
41+ < a href = "javascript:void(0)" >
42+ < i className = "menu-icon fa fa-lock bg-yellow" > </ i >
43+
44+ < div className = "menu-info" >
45+
46+ < h4 className = "control-sidebar-subheading" > Logout</ h4 >
47+ </ div >
48+ </ a >
49+ </ li >
50+ </ ul >
51+
52+ < h3 className = "control-sidebar-heading" > Tasks Progress</ h3 >
53+ < div classNameName = "table-responsive" >
54+ < table classNameName = "table table-border" >
55+ < thead >
56+ < tr >
57+ </ tr >
58+ </ thead >
59+ < tbody >
60+ { Object . keys ( this . props . serverStatus ) . map ( function ( key ) {
61+ return (
62+ < tr key = { key } >
63+ < td > { this . capitalizeFirstLetter ( key ) } </ td >
64+ < td > { this . props . serverStatus [ key ] } </ td >
65+ </ tr >
66+ )
67+ } , this ) }
68+ </ tbody >
69+ </ table >
70+ </ div >
71+ < ul className = "control-sidebar-menu" >
3872 < li >
39- < Link to = "/login" activeClassName = "active" >
40- < i className = "menu-icon fa fa-lock bg-green" > </ i >
41- Login
42- </ Link >
73+ < a href = "javascript:void(0)" >
74+ < h4 className = "control-sidebar-subheading" >
75+ Custom Template Design
76+ < span className = "label label-danger pull-right" > 70%</ span >
77+ </ h4 >
78+
79+ < div className = "progress progress-xxs" >
80+ < div className = "progress-bar progress-bar-danger" > </ div >
81+ </ div >
82+ </ a >
4383 </ li >
4484 < li >
45- < a onClick = { this . onLogout } >
46- < i className = "menu-icon fa fa-lock bg-red" > </ i >
47- Login
85+ < a href = "javascript:void(0)" >
86+ < h4 className = "control-sidebar-subheading" >
87+ Update Resume
88+ < span className = "label label-success pull-right" > 95%</ span >
89+ </ h4 >
90+
91+ < div className = "progress progress-xxs" >
92+ < div className = "progress-bar progress-bar-success" > </ div >
93+ </ div >
4894 </ a >
4995 </ li >
50- </ ul >
51- Current user: { username }
52- < div className = "table-responsive" >
53- < table className = "table table-border" >
54- < thead >
55- < tr >
56- </ tr >
57- </ thead >
58- < tbody >
59- { Object . keys ( this . props . serverStatus ) . map ( function ( key ) {
60- return (
61- < tr key = { key } >
62- < td > { this . capitalizeFirstLetter ( key ) } </ td >
63- < td > { this . props . serverStatus [ key ] } </ td >
64- </ tr >
65- )
66- } , this ) }
67- </ tbody >
68- </ table >
96+ < li >
97+ < a href = "javascript:void(0)" >
98+ < h4 className = "control-sidebar-subheading" >
99+ Laravel Integration
100+ < span className = "label label-warning pull-right" > 50%</ span >
101+ </ h4 >
102+
103+ < div className = "progress progress-xxs" >
104+ < div className = "progress-bar progress-bar-warning" > </ div >
105+ </ div >
106+ </ a >
107+ </ li >
108+ < li >
109+ < a href = "javascript:void(0)" >
110+ < h4 className = "control-sidebar-subheading" >
111+ Back End Framework
112+ < span className = "label label-primary pull-right" > 68%</ span >
113+ </ h4 >
114+
115+ < div className = "progress progress-xxs" >
116+ < div className = "progress-bar progress-bar-primary" > </ div >
117+ </ div >
118+ </ a >
119+ </ li >
120+ </ ul >
121+ </ div >
122+
123+ < div className = "tab-pane" id = "control-sidebar-settings-tab" >
124+ < form method = "post" >
125+ < h3 className = "control-sidebar-heading" > General Settings</ h3 >
126+
127+ < div className = "form-group" >
128+ < label className = "control-sidebar-subheading" >
129+ Report panel usage
130+ < input type = "checkbox" className = "pull-right" checked = "" />
131+ </ label >
132+
133+ < p >
134+ Some information about this general settings option
135+ </ p >
136+ </ div >
137+
138+ < div className = "form-group" >
139+ < label className = "control-sidebar-subheading" >
140+ Allow mail redirect
141+ < input type = "checkbox" className = "pull-right" checked = "" />
142+ </ label >
143+
144+ < p >
145+ Other sets of options are available
146+ </ p >
147+ </ div >
148+
149+ < div className = "form-group" >
150+ < label className = "control-sidebar-subheading" >
151+ Expose author name in posts
152+ < input type = "checkbox" className = "pull-right" checked = "" />
153+ </ label >
154+
155+ < p >
156+ Allow the user to show his name in blog posts
157+ </ p >
158+ </ div >
159+
160+ < h3 className = "control-sidebar-heading" > Chat Settings</ h3 >
161+
162+ < div className = "form-group" >
163+ < label className = "control-sidebar-subheading" >
164+ Show me as online
165+ < input type = "checkbox" className = "pull-right" checked = "" />
166+ </ label >
167+ </ div >
168+
169+ < div className = "form-group" >
170+ < label className = "control-sidebar-subheading" >
171+ Turn off notifications
172+ < input type = "checkbox" className = "pull-right" />
173+ </ label >
174+ </ div >
175+
176+ < div className = "form-group" >
177+ < label className = "control-sidebar-subheading" >
178+ Delete chat history
179+ < a href = "javascript:void(0)" className = "text-red pull-right" > < i className = "fa fa-trash-o" > </ i > </ a >
180+ </ label >
181+ </ div >
182+ </ form >
69183 </ div >
70- < div className = "control-sidebar-bg" style = { { position : "fixed" , height : "auto" } } > </ div >
71- </ aside >
184+ </ div >
185+ </ aside >
72186 )
73187 }
74188}
0 commit comments