removed: sandbox vault feature

This commit is contained in:
quenousimporte 2023-05-02 15:55:54 +02:00
parent f3a94f5552
commit 9fcb32793d
2 changed files with 1 additions and 35 deletions

View File

@ -46,7 +46,6 @@
</div>
<div id="notecontent">
<input id="datafile" type="file" onchange="loaddatafile(this)" hidden/>
<textarea id="md" spellcheck="false" oninput="datachanged()" onkeydown="editorkeydown()" onclick="clickeditor()"></textarea>
<div hidden id="preview"></div>
</div>

35
main.js
View File

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