chore: enabling more toast success and error
This commit is contained in:
@ -271,9 +271,11 @@ export const systemIOMachine = setup({
|
||||
},
|
||||
onDone: {
|
||||
target: SystemIOMachineStates.readingFolders,
|
||||
actions: [SystemIOMachineActions.toastSuccess],
|
||||
},
|
||||
onError: {
|
||||
target: SystemIOMachineStates.idle,
|
||||
actions: [SystemIOMachineActions.toastError],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -290,9 +292,11 @@ export const systemIOMachine = setup({
|
||||
},
|
||||
onDone: {
|
||||
target: SystemIOMachineStates.readingFolders,
|
||||
actions: [SystemIOMachineActions.toastSuccess],
|
||||
},
|
||||
onError: {
|
||||
target: SystemIOMachineStates.idle,
|
||||
actions: [SystemIOMachineActions.toastError],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -314,6 +318,7 @@ export const systemIOMachine = setup({
|
||||
},
|
||||
onError: {
|
||||
target: SystemIOMachineStates.idle,
|
||||
actions: [SystemIOMachineActions.toastError],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -118,7 +118,12 @@ export const systemIOMachineDesktop = systemIOMachine.provide({
|
||||
),
|
||||
newProjectName
|
||||
)
|
||||
// DONE
|
||||
|
||||
return {
|
||||
message: `Successfully renamed "${projectName}" to "${newProjectName}"`,
|
||||
oldName: projectName,
|
||||
newName: newProjectName,
|
||||
}
|
||||
}
|
||||
),
|
||||
[SystemIOMachineActors.deleteProject]: fromPromise(
|
||||
@ -136,6 +141,11 @@ export const systemIOMachineDesktop = systemIOMachine.provide({
|
||||
recursive: true,
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
message: `Successfully deleted "${input.requestedProjectName}"`,
|
||||
name: input.requestedProjectName,
|
||||
}
|
||||
}
|
||||
),
|
||||
[SystemIOMachineActors.createKCLFile]: fromPromise(
|
||||
|
||||
Reference in New Issue
Block a user