Files
uncensored-send/web/templates/info.html
T

55 lines
2.0 KiB
HTML

{{define "content"}}
<section class="card">
<h1 class="filename">{{.Meta.Filename}}</h1>
<dl>
<dt>Size</dt><dd>{{.Size}}</dd>
<dt>Expires</dt><dd>{{.Expires}}</dd>
<dt>SHA-256</dt><dd class="mono wrap">{{.Meta.SHA256}}</dd>
</dl>
<p class="actions"><a class="button" href="{{.Base}}d/{{.Meta.ID}}">Download</a></p>
<div class="field">
<span>Direct link</span>
<div class="copyrow">
<input type="text" id="link-file" value="{{.URL}}" readonly>
<button type="button" class="copy" data-copy="link-file" hidden>Copy</button>
</div>
</div>
</section>
<section class="card">
<details class="panel"{{if .Error}} open{{end}}>
<summary>Remove this file</summary>
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
{{if .CanDelete}}
<p class="hint">Your token can remove this file.</p>
<form method="post" action="{{.Base}}d/{{.Meta.ID}}/delete">
<input type="hidden" name="from" value="info">
<button type="submit" class="danger"
data-confirm="Delete {{.Meta.Filename}}? This cannot be undone.">Delete this file</button>
</form>
{{else}}
<p class="hint">
Paste the delete token you were given when this file was uploaded.
It is the only way to remove a file early without an owning token.
</p>
<form method="post" action="{{.Base}}d/{{.Meta.ID}}/delete">
<input type="hidden" name="from" value="info">
<label class="field">
<span>Delete token</span>
<!-- Plain text, like the upload form's: a delete token is pasted
once and a mask would only hide a mistake in it. -->
<input type="text" name="token" autocomplete="off" required
spellcheck="false" autocapitalize="off">
</label>
<button type="submit" class="danger"
data-confirm="Delete {{.Meta.Filename}}? This cannot be undone.">Delete this file</button>
</form>
{{end}}
</details>
</section>
{{end}}