Skip to content

Commit 30a6dae

Browse files
Merge pull request #298 from parallaxinc/delete-project-confirm
show project overlay upon delete, show notification upon delete success Verified to operate according to the description above.
2 parents cb6af13 + aed2545 commit 30a6dae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/plugins/handlers.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ function handlers(app, opts, done){
234234

235235
const dirpath = path.join('/', projectName);
236236

237-
workspace.deleteDirectory(dirpath);
237+
workspace.deleteDirectory(dirpath)
238+
.finally(function(){
239+
showProjectsOverlay();
240+
});
238241
}
239242

240243
function deleteProjectConfirm(name){

src/plugins/notifications.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function notifications({ workspace, toast }, opts, done){
2020
DELETE_FILE_SUCCESS,
2121
DELETE_FILE_FAILURE,
2222
CHANGE_FILE_FAILURE,
23+
DELETE_DIRECTORY_SUCCESS,
2324
DELETE_DIRECTORY_FAILURE,
2425
CHANGE_DIRECTORY_FAILURE
2526
} = workspace.STATUS_CONSTANTS;
@@ -30,6 +31,7 @@ function notifications({ workspace, toast }, opts, done){
3031
switch(status){
3132
case SAVE_FILE_SUCCESS:
3233
case DELETE_FILE_SUCCESS:
34+
case DELETE_DIRECTORY_SUCCESS:
3335
toast.show(notification, { style: styles.successToast, timeout: 5000 });
3436
break;
3537
case SAVE_FILE_FAILURE:

0 commit comments

Comments
 (0)