@@ -4,14 +4,15 @@ import * as selectors from '../../services/selectors'
44import SideMenu from './components/SideMenu'
55import Level from './components/Level'
66import Icon from '../../components/Icon'
7- import SettingsPage from './containers/Settings'
87import ReviewPage from './containers/Review'
98import Button from '../../components/Button'
109import ProcessMessages from '../../components/ProcessMessages'
1110import TestMessage from '../../components/TestMessage'
12- import { Progress } from '@alifd/next '
11+ import StepProgress from './components/StepProgress '
1312import { DISPLAY_RUN_TEST_BUTTON } from '../../environment'
1413import formatLevels from './formatLevels'
14+ // import SettingsPage from './containers/Settings'
15+ // import Reset from './components/Reset'
1516
1617const styles = {
1718header :{
@@ -47,13 +48,6 @@ const styles = {
4748right :0 ,
4849color :'white' ,
4950} ,
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- } ,
5751processes :{
5852padding :'0 1rem' ,
5953position :'fixed' as 'fixed' ,
@@ -100,6 +94,10 @@ const TutorialPage = (props: PageProps) => {
10094props . send ( { type :'RUN_TEST' } )
10195}
10296
97+ const onReset = ( ) :void => {
98+ // TODO
99+ }
100+
103101const [ menuVisible , setMenuVisible ] = React . useState ( false )
104102
105103const [ page , setPage ] = React . useState < 'level' | 'settings' | 'review' > ( 'level' )
@@ -140,39 +138,27 @@ const TutorialPage = (props: PageProps) => {
140138</ div >
141139) }
142140{ /* 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 >
150148
151149{ /* Center */ }
152- < div />
150+ < div css = { { flex :1 , display :'flex' , justifyContent :'center' } } >
151+ { /* <Reset onReset={onReset} disabled={processes.length > 0} /> */ }
152+ </ div >
153153
154154{ /* Right */ }
155- < div >
155+ < div css = { { flex : 1 , display : 'flex' , justifyContent : 'flex-end' } } >
156156{ level . status === 'COMPLETE' || ! level . steps . length ?(
157157< Button style = { { marginRight :'1rem' } } type = "primary" onClick = { onContinue } >
158158 Continue
159159</ Button >
160160) :(
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 } />
176162) }
177163</ div >
178164</ div >