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

Commita71d857

Browse files
committed
respond with Tutorial configure error
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent13292c8 commita71d857

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

‎src/channel/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ class Channel implements Channel {
8888

8989
try{
9090
// TODO: better handle errors
91-
awaittutorialConfig({config:data.config},onError)
91+
awaittutorialConfig({config:data.config})
9292
}catch(error){
93-
// TODO send failure messages back to client
94-
// to show errors in the webview
93+
this.send({type:'TUTORIAL_CONFIGURE_FAIL',payload:{error:error.message}})
94+
return
9595
}
9696

9797
// report back to the webview that setup is complete

‎typings/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export interface MachineStateSchema {
6969
Setup:{
7070
states:{
7171
Startup:{}
72-
Error:{}
7372
LoadStoredTutorial:{}
7473
Start:{}
7574
ValidateSetup:{}

‎web-app/src/Routes.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ const Routes = () => {
3131
<Routepath="Setup.GitNotInstalled">
3232
<GitInstalledsend={send}/>
3333
</Route>
34-
<Routepath="Setup.Error">
35-
<LoadingPagetext="Error"context={context}/>
36-
</Route>
3734
<Routepath="Setup.SelectTutorial">
3835
<SelectTutorialPagesend={send}context={context}/>
3936
</Route>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export const createMachine = (options: any) => {
4242
},
4343
},
4444
},
45-
Error:{},
4645
LoadStoredTutorial:{
4746
onEntry:['loadStoredTutorial'],
4847
on:{
@@ -103,7 +102,10 @@ export const createMachine = (options: any) => {
103102
SetupNewTutorial:{
104103
onEntry:['configureNewTutorial'],
105104
on:{
106-
GIT_REMOTE_FAILED:'GitRemoteFailed',
105+
TUTORIAL_CONFIGURE_FAIL:{
106+
actions:['setError'],
107+
},
108+
TRY_AGAIN:'SetupNewTutorial',
107109
TUTORIAL_CONFIGURED:'StartNewTutorial',
108110
},
109111
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp