diff --git a/index.html b/index.html index 9c3409b..2f44c92 100644 --- a/index.html +++ b/index.html @@ -46,7 +46,6 @@
-
diff --git a/main.js b/main.js index 2e8ac11..a1b08be 100644 --- a/main.js +++ b/main.js @@ -37,8 +37,6 @@ var tags = null; var currentvault = ""; var currenttag = ""; -var vaults = ["local", "remote", "sandbox"]; - var stat = { ses: @@ -273,10 +271,6 @@ var commands = [ action: shownotelinks, shortcut: "ctrl+l" }, -{ - hint: "Select vault", - action: selectvault -}, { hint: "Switch local/remote vault", action: switchvault, @@ -579,7 +573,6 @@ function applyvault(vault) { window.localStorage.setItem("vault", vault); init(); - datafile.hidden = vault != "sandbox"; } function switchvault() @@ -591,15 +584,6 @@ function switchvault() } } -function selectvault() -{ - searchinlist(vaults, null, vaults.findIndex( (v) => v == currentvault)) - .then(vault => - { - applyvault(vault); - }); -} - function ancestors(note) { var list = [note]; @@ -1026,11 +1010,10 @@ function downloadnotes() function downloadallvaults() { - var data = + var data = { local: JSON.parse(window.localStorage.getItem("local")), remote: JSON.parse(window.localStorage.getItem("remote")), - sandbox: JSON.parse(window.localStorage.getItem("sandbox")), trash: JSON.parse(window.localStorage.getItem("trash")), }; download("notes " + timestamp() + ".json", JSON.stringify(data)); @@ -1177,22 +1160,6 @@ function initvault() currentvault = window.localStorage.getItem("vault") || "local"; } -function loaddatafile(filepath) -{ - reader = new FileReader(); - if (filepath.files && filepath.files[0]) - { - reader.onload = function (e) - { - localdata = JSON.parse(e.target.result); - loadlast(); - datafile.hidden = true; - }; - reader.readAsText(filepath.files[0]); - } - return true; -} - function init() { loadsettings();