added: command to download encrypted remote vault
This commit is contained in:
parent
4fb03969fc
commit
ca4a54f36a
15
main.js
15
main.js
|
@ -275,6 +275,11 @@ var commands = [
|
||||||
{
|
{
|
||||||
hint: "Sort todo.txt list",
|
hint: "Sort todo.txt list",
|
||||||
action: sorttodotxt
|
action: sorttodotxt
|
||||||
|
},
|
||||||
|
{
|
||||||
|
hint: "Download encrypted data",
|
||||||
|
remoteonly: true,
|
||||||
|
action: downloadencrypted
|
||||||
}];
|
}];
|
||||||
|
|
||||||
var snippets = [
|
var snippets = [
|
||||||
|
@ -1146,6 +1151,16 @@ function downloadvault()
|
||||||
download("notes " + timestamp() + " " + currentvault + ".json", window.localStorage.getItem(currentvault));
|
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()
|
function downloadnotewithsubs()
|
||||||
{
|
{
|
||||||
var note = withsubs();
|
var note = withsubs();
|
||||||
|
|
Loading…
Reference in New Issue