URL shortener and file dump for hashru.link https://hashru.link
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
1.4 KiB

{{define "title"}}
'{{.Paste.Key}}{{.FileExt}}' metadata - rushlink
{{end}}
{{define "head-append"}}
<script type="text/javascript" src="/js/copyclipboard.js" defer></script>
{{end}}
{{define "body"}}
<pre id="copyToClipboardContainer" class="hidden">
<button onclick="copyToClipboard('{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}')">Copy URL to clipboard</button> <span id="copyToClipboardStatus"></span>
</pre>
<pre>
<a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}</a>
---
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
with delete token: <a href="{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}">{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}</a>
{{else -}}
with delete token: &lt;unknown&gt;
{{end -}}
type: {{.Paste.Type}}
state: {{.Paste.State}}
{{if .Paste.CreatedAt.IsZero -}}
created: unknown
{{else -}}
created: {{.Paste.CreatedAt}}
{{end -}}
{{if .Paste.UpdatedAt.IsZero -}}
last updated: unknown
{{else -}}
last updated: {{.Paste.UpdatedAt}}
{{end -}}
{{if .Paste.DeletedAt.Valid -}}
deleted at: {{.Paste.DeletedAt.Time}}
{{end -}}
delete token: {{.CanDeleteString}}
<form action="delete?deleteToken={{.Paste.DeleteToken}}" method="post">
<input type="submit" name="delete" value="Delete paste"
{{- if or (eq .Paste.State.String "deleted") (not .CanDeleteBool) -}}
disabled
{{- end -}}
>
</form>
</pre>
{{end}}