diff options
Diffstat (limited to 'templates/pages/save.gohtml')
-rw-r--r-- | templates/pages/save.gohtml | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/templates/pages/save.gohtml b/templates/pages/save.gohtml index 2b427f6..318fd51 100644 --- a/templates/pages/save.gohtml +++ b/templates/pages/save.gohtml @@ -1,14 +1,25 @@ {{template "layout.gohtml" .}} {{define "content"}} -<div class="layout-center"> - <form action="/"> +<div class="flex content three"> + <div class="full off-third-800 third-800"> <h1>Saved</h1> Secret url: - <hr /> - <p>https://sendsafe.xyz/s/{{.id}}</p> + <div class="stack"> + <input class="stack" type="text" id="link" value="https://sendsafe.xyz/s/{{.id}}" /> + <button class="stack" id="copy"><i class="icon-docs"></i> Copy link</button> + </div> <p>Send this link to recepient. This link can be viewed only once!</p> - <hr /> - <input type="submit" value="← Back"> - </form> + <a href="/" class="button"><i class="icon-left-big"></i> Back</a> + </div> </div> +<script type="application/javascript"> +htmx.onLoad(function(content) { + document.getElementById("copy").onclick = function () { + var copyText = document.getElementById("link"); + copyText.select(); + copyText.setSelectionRange(0, 99999); + document.execCommand("copy"); + } +}) +</script> {{ end }} |