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