From ca4a54f36aa7108be88be4e5e11a7c13ac0eb94a Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 27 Oct 2023 12:54:01 +0200 Subject: [PATCH] added: command to download encrypted remote vault --- main.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.js b/main.js index 5742c78..6d73cf8 100644 --- a/main.js +++ b/main.js @@ -275,6 +275,11 @@ var commands = [ { hint: "Sort todo.txt list", action: sorttodotxt +}, +{ + hint: "Download encrypted data", + remoteonly: true, + action: downloadencrypted }]; var snippets = [ @@ -1146,6 +1151,16 @@ function downloadvault() download("notes " + timestamp() + " " + currentvault + ".json", window.localStorage.getItem(currentvault)); } + +function downloadencrypted() +{ + encryptstring(JSON.stringify(localdata)) + .then(encrypted => + { + download("encrypted notes " + timestamp() + " " + currentvault + ".acs", encrypted); + }); +} + function downloadnotewithsubs() { var note = withsubs();