refined open logic when sketch name is invalid

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-08-03 17:19:52 +02:00
parent aadd403cdb
commit 650230a571
3 changed files with 33 additions and 6 deletions

View File

@@ -18,9 +18,9 @@ export class WorkspaceDeleteHandler extends TheiaWorkspaceDeleteHandler {
// Deleting the main sketch file.
if (uris.map(uri => uri.toString()).some(uri => uri === sketch.mainFileUri)) {
const { response } = await remote.dialog.showMessageBox({
title: 'Delete',
type: 'question',
buttons: ['Cancel', 'OK'],
title: 'Delete',
message: 'Do you want to delete the current sketch?'
});
if (response === 1) { // OK