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

Keep messaging system alive when locked/encrypted

Former-commit-id: becceb5fed276d2daa80eca4a41b9fa9d3eae9fd [formerly 4ac3d85f084df155b06e17eea289e34ea60faa50] [formerly 19561726e85e6c133c667d1ee948b0ff2978632d [formerly a3fe621f1947a2cf0b6af4ac6ccb01c3c744fc2e]]
Former-commit-id: 3b7092e62e255f90d4ddcea9a104f5e6db22da2e [formerly 0dd41c8f221df6a21fad9da2ff2287ebb98f3b9a]
Former-commit-id: 62a685d81f08d7b96596cbc236c540141cdd9e42
Former-commit-id: 4b75f66381
This commit is contained in:
Zack Scholl 2017-03-23 10:39:14 -06:00
parent c1b9b71669
commit bd6ed8d3c0
2 changed files with 8 additions and 3 deletions

View File

@ -1 +1 @@
083d9060ba97213d049e1f19f11ff57620b5956e
f74b6571b2ecfc146281dfaa007b62508b33b2f7

View File

@ -277,6 +277,11 @@
e.preventDefault();
var passphrase = prompt("Please enter a passphrase to lock", "");
if (passphrase != null) {
if ($('#lockPage').text() == "Lock") {
$("#saveEditButton").text("Locking");
} else {
$("#saveEditButton").text("Unlocking");
}
lockPage(passphrase);
// POST encrypt page
// reload page
@ -358,9 +363,9 @@
<li class="pure-menu-item {{ with .ViewPage }}pure-menu-selected{{ end }}"><a href="/{{ .Page }}/view" class="pure-menu-link">View</a></li>
{{ if (or (.IsLocked) (.IsEncrypted) )}}
{{ if .IsLocked }}
<li class="pure-menu-item">Locked</li>
<li class="pure-menu-item"><span id="saveEditButton">Locked</span></li>
{{ else }}
<li class="pure-menu-item">Encrypted</li>
<li class="pure-menu-item"><span id="saveEditButton">Encrypted</span></li>
{{ end }}
{{else}}<li class="pure-menu-item {{ with .ListPage }}pure-menu-selected{{ end }}"><a href="/{{ .Page }}/list" class="pure-menu-link">List</a></li>
<li class="pure-menu-item {{ with .EditPage }}pure-menu-selected{{ end }}"><a href="/{{ .Page }}/edit" class="pure-menu-link"><span id="saveEditButton">Edit</span></a></li>