File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -320,17 +320,17 @@ class Channel implements Channel {
320320 case 'EDITOR_RUN_TEST' :
321321 vscode . commands . executeCommand ( COMMANDS . RUN_TEST , action ?. payload )
322322 return
323- case 'EDITOR_RUN_RESET_SCRIPT' :
324- const tutorial : TT . Tutorial | null = this . context . tutorial . get ( )
323+ case 'EDITOR_RUN_RESET' :
324+ // reset to timeline
325+ // 1. get last pass commit
326+ // 2. load timeline until last pass commit
327+
325328 // if tutorial.config.reset.command, run it
329+ const tutorial : TT . Tutorial | null = this . context . tutorial . get ( )
326330 if ( tutorial ?. config ?. reset ?. command ) {
327331 await exec ( { command : tutorial . config . reset . command } )
328332 }
329333 return
330- case 'EDITOR_RUN_RESET_TO_LAST_PASS' :
331- return
332- case 'EDITOR_RUN_RESET_TO_TIMELINE' :
333- return
334334 default :
335335 logger ( `No match for action type: ${ actionType } ` )
336336 return
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import StepProgress from './components/StepProgress'
1212import { DISPLAY_RUN_TEST_BUTTON } from '../../environment'
1313import formatLevels from './formatLevels'
1414// import SettingsPage from './containers/Settings'
15- // import Reset from './components/Reset'
15+ import Reset from './components/Reset'
1616
1717const styles = {
1818 header : {
@@ -95,7 +95,7 @@ const TutorialPage = (props: PageProps) => {
9595 }
9696
9797 const onReset = ( ) : void => {
98- // TODO
98+ props . send ( { type : 'RUN_RESET' } )
9999 }
100100
101101 const [ menuVisible , setMenuVisible ] = React . useState ( false )
@@ -148,7 +148,7 @@ const TutorialPage = (props: PageProps) => {
148148
149149 { /* Center */ }
150150 < div css = { { flex : 1 , display : 'flex' , justifyContent : 'center' } } >
151- { /* <Reset onReset={onReset} disabled={processes.length > 0} /> */ }
151+ < Reset onReset = { onReset } disabled = { processes . length > 0 } />
152152 </ div >
153153
154154 { /* Right */ }
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ export default (editorSend: any) => ({
117117 payload : { position : context . position } ,
118118 } )
119119 } ,
120- runResetScript ( ) {
120+ runReset ( ) {
121121 editorSend ( {
122- type : 'EDITOR_RUN_RESET_SCRIPT ' ,
122+ type : 'EDITOR_RUN_RESET ' ,
123123 } )
124124 } ,
125125} )
Original file line number Diff line number Diff line change @@ -168,8 +168,8 @@ export const createMachine = (options: any) => {
168168 RUN_TEST : {
169169 actions : [ 'runTest' ] ,
170170 } ,
171- RESET_SCRIPT : {
172- actions : [ 'runResetScript ' ] ,
171+ RUN_RESET : {
172+ actions : [ 'runReset ' ] ,
173173 } ,
174174 } ,
175175 } ,
You can’t perform that action at this time.
0 commit comments