feat(upload): add dynamic expiry options and modern UI theme
- Implement dynamic expiry options on the upload page based on user roles and retention policies. - Add helper functions to build and format expiry options into human-readable labels. - Introduce a new modern theme featuring glassmorphism, gradients, and frosted glass cards.
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
<section class="upload-view" aria-labelledby="upload-title">
|
||||
<div class="hero-copy">
|
||||
{{if .CurrentUser}}
|
||||
<h1 id="upload-title">Upload files.</h1>
|
||||
<p class="hero-eyebrow">Welcome back, {{.CurrentUser.Username}}</p>
|
||||
<h1 id="upload-title">Drop it. Share it.</h1>
|
||||
<p>{{.Data.LimitSummary}}</p>
|
||||
{{else}}
|
||||
<p class="hero-eyebrow">Welcome</p>
|
||||
<h1 id="upload-title">Send a file. Get a link.</h1>
|
||||
<p>Anonymous, self-hosted transfers. No account required.</p>
|
||||
<p>Fast, private transfers that expire on your terms.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -32,7 +34,6 @@
|
||||
<div class="option-grid">
|
||||
{{if .CurrentUser}}
|
||||
<label>
|
||||
<span>Collection</span>
|
||||
<select name="collection_id">
|
||||
<option value="">Unsorted</option>
|
||||
{{range .Data.Collections}}<option value="{{.ID}}">{{.Name}}</option>{{end}}
|
||||
@@ -41,10 +42,8 @@
|
||||
{{end}}
|
||||
<label>
|
||||
<span>Expires in</span>
|
||||
<select name="max_days">
|
||||
<option value="7">7 days</option>
|
||||
<option value="1">1 day</option>
|
||||
<option value="30">30 days</option>
|
||||
<select name="expires_minutes" data-expiry-select>
|
||||
{{range .Data.ExpiryOptions}}<option value="{{.Minutes}}"{{if eq .Minutes $.Data.DefaultExpiryMinutes}} selected{{end}}>{{.Label}}</option>{{end}}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
|
||||
Reference in New Issue
Block a user