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

Commit0a47e7e

Browse files
committed
reset progress on exit
1 parent6e0caaa commit0a47e7e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,25 @@ export default {
117117
returnprogress
118118
},
119119
}),
120+
//@ts-ignore
121+
reset:assign({
122+
tutorial(){
123+
returnnull
124+
},
125+
progress():CR.Progress{
126+
return{
127+
levels:{},
128+
stages:{},
129+
steps:{},
130+
complete:false
131+
}
132+
},
133+
position():CR.Position{
134+
return{
135+
levelId:'',
136+
stageId:'',
137+
stepId:''
138+
}
139+
}
140+
})
120141
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
169169
Completed:{
170170
id:'completed-tutorial',
171171
on:{
172-
SELECT_TUTORIAL:'#start-new-tutorial'
172+
SELECT_TUTORIAL:{
173+
target:'#start-new-tutorial',
174+
actions:['reset']
175+
}
173176
}
174177
},
175178
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp