Call vanity vanity again

This commit is contained in:
2026-09-13 11:11:16 +02:00
parent adf118385a
commit 9551b84d3c
6 changed files with 16 additions and 15 deletions
+1 -1
View File
@@ -29,7 +29,7 @@
<tr>
<td data-label="File" class="filecell">
<a href="{{$.Base}}i/{{.ID}}">{{.Filename}}</a>
<span class="id mono">{{.ID}}{{if .Vanity}} <em title="custom name">★</em>{{end}}</span>
<span class="id mono">{{.ID}}{{if .Vanity}} <em title="vanity name">★</em>{{end}}</span>
</td>
<td data-label="Size" class="num nowrap">{{.Size}}</td>
<td data-label="Owner">{{if .Owner}}{{.Owner}}{{else}}<em>anonymous</em>{{end}}</td>
+4 -3
View File
@@ -17,8 +17,9 @@
<input type="text" name="expiry" id="expiry" placeholder="{{.ExpiryHint}}" autocomplete="off">
</label>
<label class="field">
<span>Custom name <em>({{if .AllowVanity}}optional{{else}}needs a token{{end}})</em></span>
<span>Vanity name <em>({{if .AllowVanity}}optional{{else}}needs a token{{end}})</em></span>
<input type="text" name="vanity" id="vanity" placeholder="auto" autocomplete="off"
spellcheck="false" autocapitalize="off"
pattern="[A-Za-z0-9][A-Za-z0-9._-]{1,63}">
</label>
</div>
@@ -31,7 +32,7 @@
</p>
<label class="field">
<span>Token</span>
<input type="password" name="token" autocomplete="off">
<input type="password" name="token" autocomplete="new-password">
</label>
</details>
@@ -56,7 +57,7 @@
<dt>Maximum size</dt><dd>{{.MaxSize}}</dd>
<dt>Longest lifetime</dt><dd>{{.MaxExpiry}}</dd>
<dt>Default lifetime</dt><dd>{{.DefaultExpiry}}</dd>
<dt>Custom names</dt><dd>{{if .AllowVanity}}allowed{{else}}need a token{{end}}</dd>
<dt>Vanity names</dt><dd>{{if .AllowVanity}}allowed{{else}}need a token{{end}}</dd>
</dl>
{{if not .User}}<p class="hint"><a href="{{.Base}}login">Log in</a> with a token to raise these.</p>{{end}}
</section>
+1 -1
View File
@@ -6,7 +6,7 @@
<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>
<dt>Vanity names</dt><dd>{{if .Vanity}}allowed{{else}}not allowed{{end}}</dd>
</dl>
<p class="actions">
<a class="button" href="{{.Base}}">Upload a file</a>