Require unlock to delete

This commit is contained in:
Mo Bitar
2018-10-17 13:57:01 -05:00
parent 87485584ec
commit 09837bd2fa

View File

@@ -373,6 +373,11 @@ angular.module('app')
}
this.deleteNote = function() {
if(this.note.locked) {
alert("This note is locked. If you'd like to delete it, unlock it, and try again.");
return;
}
let title = this.note.safeTitle().length ? `'${this.note.title}'` : "this note";
if(confirm(`Are you sure you want to delete ${title}?`)) {
this.remove()(this.note);