@@ -4,14 +4,15 @@ import * as selectors from '../../services/selectors'
4
4
import SideMenu from './components/SideMenu'
5
5
import Level from './components/Level'
6
6
import Icon from '../../components/Icon'
7
- import SettingsPage from './containers/Settings'
8
7
import ReviewPage from './containers/Review'
9
8
import Button from '../../components/Button'
10
9
import ProcessMessages from '../../components/ProcessMessages'
11
10
import TestMessage from '../../components/TestMessage'
12
- import { Progress } from '@alifd/next '
11
+ import StepProgress from './components/StepProgress '
13
12
import { DISPLAY_RUN_TEST_BUTTON } from '../../environment'
14
13
import formatLevels from './formatLevels'
14
+ // import SettingsPage from './containers/Settings'
15
+ // import Reset from './components/Reset'
15
16
16
17
const styles = {
17
18
header : {
@@ -47,13 +48,6 @@ const styles = {
47
48
right : 0 ,
48
49
color : 'white' ,
49
50
} ,
50
- taskProgress : {
51
- display : 'flex' as 'flex' ,
52
- justifyContent : 'flex-end' as 'flex-end' ,
53
- alignItems : 'center' as 'center' ,
54
- width : '10rem' ,
55
- color : 'white' ,
56
- } ,
57
51
processes : {
58
52
padding : '0 1rem' ,
59
53
position : 'fixed' as 'fixed' ,
@@ -100,6 +94,10 @@ const TutorialPage = (props: PageProps) => {
100
94
props . send ( { type : 'RUN_TEST' } )
101
95
}
102
96
97
+ const onReset = ( ) : void => {
98
+ // TODO
99
+ }
100
+
103
101
const [ menuVisible , setMenuVisible ] = React . useState ( false )
104
102
105
103
const [ page , setPage ] = React . useState < 'level' | 'settings' | 'review' > ( 'level' )
@@ -140,39 +138,27 @@ const TutorialPage = (props: PageProps) => {
140
138
</ div >
141
139
) }
142
140
{ /* Left */ }
143
- { DISPLAY_RUN_TEST_BUTTON && level . status !== 'COMPLETE' ? (
144
- < Button style = { { marginLeft : '1rem' } } type = "primary" onClick = { onRunTest } disabled = { processes . length > 0 } >
145
- Run
146
- </ Button >
147
- ) : (
148
- < div />
149
- ) }
141
+ < div css = { { flex : 1 } } >
142
+ { DISPLAY_RUN_TEST_BUTTON && level . status !== 'COMPLETE' ? (
143
+ < Button style = { { marginLeft : '1rem' } } type = "primary" onClick = { onRunTest } disabled = { processes . length > 0 } >
144
+ Run
145
+ </ Button >
146
+ ) : null }
147
+ </ div >
150
148
151
149
{ /* Center */ }
152
- < div />
150
+ < div css = { { flex : 1 , display : 'flex' , justifyContent : 'center' } } >
151
+ { /* <Reset onReset={onReset} disabled={processes.length > 0} /> */ }
152
+ </ div >
153
153
154
154
{ /* Right */ }
155
- < div >
155
+ < div css = { { flex : 1 , display : 'flex' , justifyContent : 'flex-end' } } >
156
156
{ level . status === 'COMPLETE' || ! level . steps . length ? (
157
157
< Button style = { { marginRight : '1rem' } } type = "primary" onClick = { onContinue } >
158
158
Continue
159
159
</ Button >
160
160
) : (
161
- < Progress
162
- state = "success"
163
- progressive
164
- percent = { ( stepIndex / level . steps . length ) * 100 }
165
- shape = "line"
166
- color = "rgb(85, 132, 255)"
167
- css = { styles . taskProgress }
168
- textRender = { ( ) => {
169
- return (
170
- < span style = { { color : 'white' } } >
171
- { stepIndex } of { level . steps . length }
172
- </ span >
173
- )
174
- } }
175
- />
161
+ < StepProgress current = { stepIndex } max = { level . steps . length } />
176
162
) }
177
163
</ div >
178
164
</ div >
0 commit comments