added: command to download encrypted remote vault

This commit is contained in:
quenousimporte 2023-10-27 12:54:01 +02:00
parent 4fb03969fc
commit ca4a54f36a
1 changed files with 15 additions and 0 deletions

15
main.js
View File

@ -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();