Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: implement locked note editting

thecodrrd644c08b7fd8
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index bfc81d227..e63592d46 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -109,7 +109,11 @@ function editorStore(set, get) {
colors
};
- db.notes.add(note).then(id => {
+ const func = locked
+ ? db.vault.save.bind(db.vault)
+ : db.notes.add.bind(db.notes);
+
+ func(note).then(id => {
if (tags.length > 0) updateContext("tags", tags);
if (colors.length > 0) {
updateContext("colors", colors);