Add upload to navbar

This commit is contained in:
2026-09-13 12:12:45 +02:00
parent cb34bae784
commit 000f9d6984
5 changed files with 34 additions and 55 deletions
+4 -4
View File
@@ -6,10 +6,10 @@
<form id="upload" class="card" method="post" action="{{.Base}}upload"
enctype="multipart/form-data" data-max-size="{{.MaxSizeBytes}}">
<!-- Field order is load-bearing: the server streams this body rather than
{{- /* Field order is load-bearing: the server streams this body rather than
spooling it, so every option and the token have to arrive before the
file part does. The drop zone is lifted back to the top of the card with
CSS order, which changes what is seen without changing what is sent. -->
CSS order, which changes what is seen without changing what is sent. */}}
<div class="row">
<label class="field">
@@ -32,10 +32,10 @@
</p>
<label class="field">
<span>Token</span>
<!-- Plain text on purpose: this is pasted once, behind a collapsed
{{- /* Plain text on purpose: this is pasted once, behind a collapsed
panel, and a masked field only hides the typo. Keeping it out of
the password family also stops the browser treating this form as a
login and hunting for a username to fill in above. -->
login and hunting for a username to fill in above. */}}
<input type="text" name="token" autocomplete="off"
spellcheck="false" autocapitalize="off">
</label>
+2 -2
View File
@@ -40,8 +40,8 @@
<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. -->
{{- /* 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>
+3
View File
@@ -11,6 +11,9 @@
<header>
<a class="brand" href="{{.Base}}">Uncensored&nbsp;Send</a>
<nav>
{{- /* Uploading is what the site is for, so it is a named destination and
not only a click on the wordmark. */}}
<a href="{{.Base}}">Upload</a>
{{if .User}}
<a href="{{.Base}}files">{{if .Admin}}Administration{{else}}My files{{end}}</a>
<span class="who">{{.User}}</span>