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

Commit9153ecc

Browse files
committed
cleanup
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent18c24b0 commit9153ecc

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

‎src/channel/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@ class Channel implements Channel {
9191
}
9292
// communicate to client the tutorial & stepProgress state
9393
this.send({type:'LOAD_STORED_TUTORIAL',payload:{ env, tutorial, progress, position}})
94-
95-
return
9694
}catch(e){
9795
consterror={
9896
type:'UnknownError',
9997
message:`Location: Editor startup\n\n${e.message}`,
10098
}
10199
this.send({type:'EDITOR_STARTUP_FAILED',payload:{ error}})
102100
}
101+
return
103102

104103
// clear tutorial local storage
105104
case'TUTORIAL_CLEAR':
@@ -184,14 +183,14 @@ class Channel implements Channel {
184183

185184
// report back to the webview that setup is complete
186185
this.send({type:'TUTORIAL_CONFIGURED'})
187-
return
188186
}catch(e){
189187
consterror={
190188
type:'UnknownError',
191189
message:`Location: EditorTutorialConfig.\n\n${e.message}`,
192190
}
193191
this.send({type:'TUTORIAL_CONFIGURE_FAIL',payload:{ error}})
194192
}
193+
return
195194
case'EDITOR_TUTORIAL_CONTINUE_CONFIG':
196195
try{
197196
consttutorialContinue:TT.Tutorial|null=this.context.tutorial.get()
@@ -205,14 +204,14 @@ class Channel implements Channel {
205204
})
206205
// update the current stepId on startup
207206
vscode.commands.executeCommand(COMMANDS.SET_CURRENT_STEP,action.payload.stepId)
208-
return
209207
}catch(e){
210208
consterror={
211209
type:'UnknownError',
212210
message:`Location: Editor tutorial continue config.\n\n${e.message}`,
213211
}
214212
this.send({type:'CONTINUE_FAILED',payload:{ error}})
215213
}
214+
return
216215
case'EDITOR_VALIDATE_SETUP':
217216
try{
218217
// check workspace is selected
@@ -253,14 +252,14 @@ class Channel implements Channel {
253252
return
254253
}
255254
this.send({type:'SETUP_VALIDATED'})
256-
return
257255
}catch(e){
258256
consterror={
259257
type:'UknownError',
260258
message:e.message,
261259
}
262260
this.send({type:'VALIDATE_SETUP_FAILED',payload:{ error}})
263261
}
262+
return
264263
case'EDITOR_REQUEST_WORKSPACE':
265264
openWorkspace()
266265
return

‎src/services/logger/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import{LOG}from'../../environment'
22

3-
exporttypeLog=string|object
3+
exporttypeLog=string|object|null
44

55
constlogger=(...messages:Log[]):void=>{
66
if(!LOG){

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
9191
currentStep=level.steps.length
9292
}
9393

94-
console.log(`currentStep:${currentStep}`)
95-
9694
constpageBottomRef=React.useRef(null)
9795

9896
constscrollToBottom=()=>{

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as TT from 'typings/tutorial'
33
import{assign,send,ActionFunctionMap}from'xstate'
44
import*asselectorsfrom'../../selectors'
55
importonErrorfrom'../../../services/sentry/onError'
6+
importloggerfrom'services/logger'
67

78
constcontextActions:ActionFunctionMap<T.MachineContext,T.MachineEvent>={
89
//@ts-ignore
@@ -100,6 +101,8 @@ const contextActions: ActionFunctionMap<T.MachineContext, T.MachineEvent> = {
100101

101102
progress.levels[levelId]=true
102103

104+
logger('PROGRESS',progress)
105+
103106
returnprogress
104107
},
105108
}),

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ export const createMachine = (options: any) => {
160160
onEntry:['loadLevel','checkLevelCompleted'],
161161
on:{
162162
START_LEVEL:'Normal',
163-
START_COMPLETED_LEVEL:'LevelComplete',
163+
START_COMPLETED_LEVEL:{
164+
target:'LevelComplete',
165+
actions:['updateLevelProgress'],
166+
},
164167
},
165168
},
166169
Normal:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp