diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-03-18 03:01:46 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-03-18 03:01:46 +0300 |
commit | 37c250d538893ff8178bd9c9e4dde225a991ce76 (patch) | |
tree | 379350cdfe47d3691fef9c8c5ef91acddfba36d3 /templates/pages | |
parent | 6f31f35c7b38fbf63d7a0c9322458e0b75828495 (diff) |
pevent access from messengers
Diffstat (limited to 'templates/pages')
-rw-r--r-- | templates/pages/memo.gohtml | 14 | ||||
-rw-r--r-- | templates/pages/norfoundinline.gohtml | 2 | ||||
-rw-r--r-- | templates/pages/notfound.gohtml | 9 | ||||
-rw-r--r-- | templates/pages/save.gohtml | 3 | ||||
-rw-r--r-- | templates/pages/secret.gohtml | 6 |
5 files changed, 22 insertions, 12 deletions
diff --git a/templates/pages/memo.gohtml b/templates/pages/memo.gohtml index 804d7b7..e981266 100644 --- a/templates/pages/memo.gohtml +++ b/templates/pages/memo.gohtml @@ -3,10 +3,16 @@ <div class="layout-center"> <form action="/"> <h1>Secret:</h1> - <b>Warning!</b> This text already deleted from server! If you refresh or close page - secret will be completely lost! - <hr /> - <pre>{{.secret}}</pre> - <hr /> + <div id="content"> + <button + class='btn' + hx-get="/api/s/{{.id}}" + hx-target="#content" + hx-swap="innerHTML"> + Show secret content + </button> + <span class="htmx-indicator">Loading...</span> + </div> <input type="submit" value="← Back"> </form> </div> diff --git a/templates/pages/norfoundinline.gohtml b/templates/pages/norfoundinline.gohtml new file mode 100644 index 0000000..32c2f62 --- /dev/null +++ b/templates/pages/norfoundinline.gohtml @@ -0,0 +1,2 @@ +<h1>Not found.</h1> +<p>Link expired or already viewed.</p> diff --git a/templates/pages/notfound.gohtml b/templates/pages/notfound.gohtml index 911f8e1..d1b6e85 100644 --- a/templates/pages/notfound.gohtml +++ b/templates/pages/notfound.gohtml @@ -1,10 +1,5 @@ {{template "layout.gohtml" .}} {{define "content"}} -<div class="layout-center"> - <form action="/"> - <h1>Not found.</h1> - <p>Link expired or already viewed.</p> - <input type="submit" value="← Back"> - </form> -</div> + <h1>Not found.</h1> + <p>Link expired or already viewed.</p> {{ end }} diff --git a/templates/pages/save.gohtml b/templates/pages/save.gohtml index f940502..2b427f6 100644 --- a/templates/pages/save.gohtml +++ b/templates/pages/save.gohtml @@ -5,7 +5,8 @@ <h1>Saved</h1> Secret url: <hr /> - <a href="https://sendsafe.xyz/s/{{.id}}">https://sendsafe.xyz/s/{{.id}}</a> + <p>https://sendsafe.xyz/s/{{.id}}</p> + <p>Send this link to recepient. This link can be viewed only once!</p> <hr /> <input type="submit" value="← Back"> </form> diff --git a/templates/pages/secret.gohtml b/templates/pages/secret.gohtml new file mode 100644 index 0000000..94af286 --- /dev/null +++ b/templates/pages/secret.gohtml @@ -0,0 +1,6 @@ +<b>Warning!</b> This text already deleted from server! If you refresh or close page - secret will be completely lost! +<hr /> +<pre id="content"> + {{.secret}} +</pre> +<hr /> |