42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
{{define "content"}}
|
|
{{if .User}}
|
|
<section class="card">
|
|
<h1>Logged in</h1>
|
|
<p>You are logged in as <strong>{{.User}}</strong>.</p>
|
|
<dl>
|
|
<dt>Maximum size</dt><dd>{{.MaxSize}}</dd>
|
|
<dt>Longest lifetime</dt><dd>{{.MaxExpiry}}</dd>
|
|
<dt>Custom names</dt><dd>{{if .Vanity}}allowed{{else}}not allowed{{end}}</dd>
|
|
</dl>
|
|
<p class="actions">
|
|
<a class="button" href="{{.Base}}">Upload a file</a>
|
|
<form method="post" action="{{.Base}}logout"><button type="submit" class="link">Log out</button></form>
|
|
</p>
|
|
</section>
|
|
{{else}}
|
|
<section class="card">
|
|
<h1>Log in</h1>
|
|
<p class="hint">
|
|
A token raises your size and lifetime limits and lets you choose custom
|
|
names. Logging in keeps it for this browser, so you do not have to paste it
|
|
for every upload. Without one you can still upload anonymously.
|
|
</p>
|
|
|
|
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
|
|
|
|
<form method="post" action="{{.Base}}login">
|
|
<input type="hidden" name="next" value="{{.Next}}">
|
|
<label class="field">
|
|
<span>Token</span>
|
|
<input type="password" name="token" autocomplete="current-password" required autofocus>
|
|
</label>
|
|
<label class="check">
|
|
<input type="checkbox" name="persist" value="1" checked>
|
|
<span>Stay logged in on this device</span>
|
|
</label>
|
|
<button type="submit">Log in</button>
|
|
</form>
|
|
</section>
|
|
{{end}}
|
|
{{end}}
|