You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
Desktop: Resolves #1502: Improved note deletion dialog
This commit is contained in:
@@ -77,13 +77,16 @@ class Bridge {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
showConfirmMessageBox(message) {
|
showConfirmMessageBox(message, options = null) {
|
||||||
const result = this.showMessageBox_(this.window(), {
|
if (options === null) options = {};
|
||||||
|
|
||||||
|
const result = this.showMessageBox_(this.window(), Object.assign({}, {
|
||||||
type: 'question',
|
type: 'question',
|
||||||
message: message,
|
message: message,
|
||||||
cancelId: 1,
|
cancelId: 1,
|
||||||
buttons: [_('OK'), _('Cancel')],
|
buttons: [_('OK'), _('Cancel')],
|
||||||
});
|
}, options));
|
||||||
|
|
||||||
return result === 0;
|
return result === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -127,7 +127,11 @@ class NoteListUtils {
|
|||||||
msg = _('Delete these %d notes?', noteIds.length);
|
msg = _('Delete these %d notes?', noteIds.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ok = bridge().showConfirmMessageBox(msg);
|
const ok = bridge().showConfirmMessageBox(msg, {
|
||||||
|
buttons: [_('Delete'), _('Cancel')],
|
||||||
|
defaultId: 1,
|
||||||
|
});
|
||||||
|
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
await Note.batchDelete(noteIds);
|
await Note.batchDelete(noteIds);
|
||||||
}
|
}
|
||||||
|
@@ -139,8 +139,6 @@ class ExternalEditWatcher {
|
|||||||
|
|
||||||
const watchedPaths = this.watcher_.getWatched();
|
const watchedPaths = this.watcher_.getWatched();
|
||||||
|
|
||||||
console.info(noteFilename, watchedPaths);
|
|
||||||
|
|
||||||
for (let dirName in watchedPaths) {
|
for (let dirName in watchedPaths) {
|
||||||
if (!watchedPaths.hasOwnProperty(dirName)) continue;
|
if (!watchedPaths.hasOwnProperty(dirName)) continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user