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

Better UI for locking/encrypting

Former-commit-id: a4d999be67331667d085f4d21e76c36248d4de6d [formerly e0ea851e54280d1299e3c8285412b3df421682a7] [formerly 011d5bf0194d46ee5e2f07cb6ef16a28554235b5 [formerly 17f856fdde59ddf045a116cb85af6f7b79f9d4a5]]
Former-commit-id: b8a3b6ed199e3c06aeb6f365e4b05572a28bd852 [formerly 1998dce4d8b98ccd1586748b26d32935c9b3d78d]
Former-commit-id: 81aa00298e9fe22a5017c726b772a4a34dd53acf
Former-commit-id: c71c77fd5c
This commit is contained in:
Zack Scholl 2017-03-23 16:28:19 -06:00
parent 20dd8d4f20
commit fa7ae60d59
3 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
5c9e26680d9e507e2c4fe676ac97c5785f72de79
fd955de49d216362dc44c184a1484ec07072d3a0

View File

@ -128,6 +128,7 @@ func handlePageRequest(c *gin.Context) {
command[0:2] != "/v" &&
command[0:2] != "/l" &&
command[0:2] != "/h")
c.HTML(http.StatusOK, "index.tmpl", gin.H{
"EditPage": command[0:2] == "/e", // /edit
"ViewPage": command[0:2] == "/v", // /view

View File

@ -397,6 +397,7 @@
<a href="#" id="menuLink1" class="pure-menu-link">CowYo</a>
<ul class="pure-menu-children">
<li class="pure-menu-item"><a href="/" class="pure-menu-link">New</a></li>
<li class="pure-menu-item"><a href="https://github.com/schollz/cowyo" class="pure-menu-link">Source</a></li>
<hr>
{{ if (or (.IsLocked) (.IsEncrypted) )}}
{{ else }}
@ -413,10 +414,10 @@
{{ if (or (.IsLocked) (.IsEncrypted) )}}
{{ if .IsLocked }}
<li class="pure-menu-item"><a href="#" class="pure-menu-link" id="lockPage">{{ if .IsLocked }}Unlock{{ else }}Lock{{end}}</a></li>
<li class="pure-menu-item" class="pure-menu-link"><a href="#"><span id="saveEditButton">Locked</span></a></li>
<li class="pure-menu-item" class="pure-menu-link"><a href="#"><span id="saveEditButton"></span></a></li>
{{ else }}
<li class="pure-menu-item"><a href="#" class="pure-menu-link" id="encryptPage">{{ if .IsEncrypted }}Decrypt{{ else }}Encrypt{{end}}</a></li>
<li class="pure-menu-item" class="pure-menu-link"><a href="#"><span id="saveEditButton">Encrypted</span></a></li>
<li class="pure-menu-item" class="pure-menu-link"><a href="#"><span id="saveEditButton"></span></a></li>
{{ end }}
{{else}}
{{ if .ListPage }}