1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Merge 8999b9399d7c01c67e323498dab86bb5f04c635f into a58f4ca346eb1d1ff8363250373c188b23ea3614

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

View File

@ -270,7 +270,11 @@ $(window).load(function() {
$("#lockPage").click(function(e) { $("#lockPage").click(function(e) {
e.preventDefault(); 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 (passphrase != null) {
if ($('#lockPage').text() == "Lock") { if ($('#lockPage').text() == "Lock") {
$('#saveEditButton').removeClass(); $('#saveEditButton').removeClass();