This commit is contained in:
Corbin 2021-05-02 10:04:52 +10:00 committed by GitHub
commit 222a09f310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 156 additions and 143 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@ import (
)
func TestListFiles(t *testing.T) {
pathToData = "testdata"
pathToData := "testdata"
os.MkdirAll(pathToData, 0755)
defer os.RemoveAll(pathToData)
s := Site{PathToData: pathToData}
@ -34,7 +34,7 @@ func TestListFiles(t *testing.T) {
}
func TestGeneral(t *testing.T) {
pathToData = "testdata"
pathToData := "testdata"
os.MkdirAll(pathToData, 0755)
defer os.RemoveAll(pathToData)
s := Site{PathToData: pathToData}

View File

@ -270,7 +270,11 @@ $(window).load(function() {
$("#lockPage").click(function(e) {
e.preventDefault();
var passphrase = prompt("Please enter a passphrase to lock", "");
var passphrase;
if ($('#lockPage').text() != "Lock")
passphrase = prompt("Please enter a passphrase to unlock", "");
if (passphrase != null) {
if ($('#lockPage').text() == "Lock") {
$('#saveEditButton').removeClass();