52 lines
1.8 KiB
HTML
52 lines
1.8 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{{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>
|
|
<input type="password" name="token" autocomplete="off" required>
|
|
</label>
|
|
<button type="submit" class="danger"
|
|
data-confirm="Delete {{.Meta.Filename}}? This cannot be undone.">Delete this file</button>
|
|
</form>
|
|
{{end}}
|
|
</details>
|
|
</section>
|
|
{{end}}
|