Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb79854

Browse files
committed
send reset from client
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent613bce8 commitcb79854

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

‎src/channel/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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-
consttutorial: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+
consttutorial:TT.Tutorial|null=this.context.tutorial.get()
326330
if(tutorial?.config?.reset?.command){
327331
awaitexec({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

‎web-app/src/containers/Tutorial/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import StepProgress from './components/StepProgress'
1212
import{DISPLAY_RUN_TEST_BUTTON}from'../../environment'
1313
importformatLevelsfrom'./formatLevels'
1414
// import SettingsPage from './containers/Settings'
15-
//import Reset from './components/Reset'
15+
importResetfrom'./components/Reset'
1616

1717
conststyles={
1818
header:{
@@ -95,7 +95,7 @@ const TutorialPage = (props: PageProps) => {
9595
}
9696

9797
constonReset=():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
<divcss={{flex:1,display:'flex',justifyContent:'center'}}>
151-
{/*<Reset onReset={onReset} disabled={processes.length > 0} /> */}
151+
<ResetonReset={onReset}disabled={processes.length>0}/>
152152
</div>
153153

154154
{/* Right */}

‎web-app/src/services/state/actions/editor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
})

‎web-app/src/services/state/machine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp