refactor(ui): remaster settings and navigation layout
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m8s
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m8s
- Update navigation labels from "My Account" to "Dashboard" and "Login" to "Sign in", updating tests accordingly. - Redesign settings forms into structured sections with improved spacing and layout. - Add CSS styles for tabs, small buttons, and responsive settings sections to enhance the user experience.
This commit is contained in:
@@ -28,11 +28,13 @@
|
||||
</a>
|
||||
<div class="nav-links">
|
||||
{{if .CurrentUser}}
|
||||
<a class="button button-ghost" href="/app">Dashboard</a>
|
||||
{{if eq .CurrentUser.Role "admin"}}<a class="button button-ghost" href="/admin">Admin</a>{{end}}
|
||||
<a class="button button-ghost" href="/api">API</a>
|
||||
<a class="button button-outline" href="/account/settings">My Account</a>
|
||||
<a class="button button-outline" href="/account/settings"><span class="nav-username">{{.CurrentUser.Username}}</span></a>
|
||||
{{else}}
|
||||
<a class="button button-ghost" href="/login">Login</a>
|
||||
<a class="button button-ghost" href="/api">API</a>
|
||||
<a class="button button-outline" href="/login">Sign in</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</nav>
|
||||
@@ -44,7 +46,7 @@
|
||||
|
||||
<footer class="site-footer">
|
||||
<span>{{.AppName}} · {{.CurrentYear}} · self-hosted</span>
|
||||
<span class="footer-links">{{if .CurrentUser}}<a href="/api">API</a><a href="/account/settings">My Account</a>{{else}}<a href="/login">Login</a><a href="/api">API</a>{{end}}</span>
|
||||
<span class="footer-links">{{if .CurrentUser}}<a href="/app">Dashboard</a><a href="/api">API</a><a href="/account/settings">Account</a>{{else}}<a href="/login">Sign in</a><a href="/api">API</a>{{end}}</span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
{{define "content"}}
|
||||
<section class="app-shell" aria-labelledby="account-title">
|
||||
<aside class="app-sidebar">
|
||||
<a class="sidebar-link" href="/app">My files</a>
|
||||
<a class="sidebar-link is-active" href="/account/settings">Account settings</a>
|
||||
{{if eq .Data.Role "admin"}}<a class="sidebar-link" href="/admin">Admin</a>{{end}}
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link" href="/app">My Files</a>
|
||||
<a class="sidebar-link is-active" href="/account/settings">Account</a>
|
||||
{{if eq .Data.Role "admin"}}<a class="sidebar-link" href="/admin">Admin panel</a>{{end}}
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<form class="sidebar-logout" action="/logout" method="post">
|
||||
<button class="button button-outline" type="submit">Logout</button>
|
||||
<button class="button button-outline" type="submit">Sign out</button>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -3,13 +3,19 @@
|
||||
{{define "content"}}
|
||||
<section class="app-shell admin-shell" aria-labelledby="admin-title">
|
||||
<aside class="app-sidebar">
|
||||
<a class="sidebar-link {{if eq .Data.Section "overview"}}is-active{{end}}" href="/admin">Overview</a>
|
||||
<a class="sidebar-link {{if eq .Data.Section "files"}}is-active{{end}}" href="/admin/files">Files</a>
|
||||
<a class="sidebar-link" href="/admin/users">Users</a>
|
||||
<a class="sidebar-link" href="/admin/settings">Settings</a>
|
||||
<a class="sidebar-link" href="/app">My files</a>
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link {{if eq .Data.Section "overview"}}is-active{{end}}" href="/admin">Overview</a>
|
||||
<a class="sidebar-link {{if eq .Data.Section "files"}}is-active{{end}}" href="/admin/files">Files</a>
|
||||
<a class="sidebar-link" href="/admin/users">Users</a>
|
||||
<a class="sidebar-link" href="/admin/settings">Settings</a>
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link" href="/app">My Files</a>
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<form class="sidebar-logout" action="/admin/logout" method="post">
|
||||
<button class="button button-outline" type="submit">Logout</button>
|
||||
<button class="button button-outline" type="submit">Sign out</button>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -3,62 +3,76 @@
|
||||
{{define "content"}}
|
||||
<section class="app-shell admin-shell" aria-labelledby="admin-settings-title">
|
||||
<aside class="app-sidebar">
|
||||
<a class="sidebar-link" href="/admin">Overview</a>
|
||||
<a class="sidebar-link" href="/admin/files">Files</a>
|
||||
<a class="sidebar-link" href="/admin/users">Users</a>
|
||||
<a class="sidebar-link is-active" href="/admin/settings">Settings</a>
|
||||
<a class="sidebar-link" href="/app">My files</a>
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link" href="/admin">Overview</a>
|
||||
<a class="sidebar-link" href="/admin/files">Files</a>
|
||||
<a class="sidebar-link" href="/admin/users">Users</a>
|
||||
<a class="sidebar-link is-active" href="/admin/settings">Settings</a>
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link" href="/app">My Files</a>
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<form class="sidebar-logout" action="/admin/logout" method="post">
|
||||
<button class="button button-outline" type="submit">Logout</button>
|
||||
<button class="button button-outline" type="submit">Sign out</button>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<div class="app-main">
|
||||
<div class="admin-header">
|
||||
<div>
|
||||
<p class="kicker">Operator console</p>
|
||||
<h1 id="admin-settings-title">{{.Data.PageTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h2>Upload policy</h2>
|
||||
<p>Values are stored in megabytes. Admin users bypass these upload caps.</p>
|
||||
</div>
|
||||
<div class="admin-header">
|
||||
<div>
|
||||
<p class="kicker">Operator console</p>
|
||||
<h1 id="admin-settings-title">{{.Data.PageTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h2>Upload policy</h2>
|
||||
<p>Admin users bypass all upload caps. Values are in megabytes.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="settings-form" action="/admin/settings" method="post">
|
||||
<div class="settings-section">
|
||||
<h3 class="settings-section-title">Anonymous uploads</h3>
|
||||
<label class="checkbox-field">
|
||||
<input type="checkbox" name="anonymous_uploads_enabled" {{if .Data.Settings.AnonymousUploadsEnabled}}checked{{end}}>
|
||||
<span>Allow anonymous uploads</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Max upload size (MB)</span>
|
||||
<input name="anonymous_max_upload_mb" value="{{.Data.Settings.AnonymousMaxUploadMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Daily cap per IP (MB)</span>
|
||||
<input name="anonymous_daily_upload_mb" value="{{.Data.Settings.AnonymousDailyUploadMB}}" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3 class="settings-section-title">User limits</h3>
|
||||
<label>
|
||||
<span>Daily upload cap (MB)</span>
|
||||
<input name="user_daily_upload_mb" value="{{.Data.Settings.UserDailyUploadMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Default storage quota (MB)</span>
|
||||
<input name="default_user_storage_mb" value="{{.Data.Settings.DefaultUserStorageMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Usage retention (days)</span>
|
||||
<input type="number" name="usage_retention_days" min="1" value="{{.Data.Settings.UsageRetentionDays}}" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Save settings</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form class="settings-form" action="/admin/settings" method="post">
|
||||
<label class="checkbox-field">
|
||||
<input type="checkbox" name="anonymous_uploads_enabled" {{if .Data.Settings.AnonymousUploadsEnabled}}checked{{end}}>
|
||||
<span>Allow anonymous uploads</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Anonymous max upload MB</span>
|
||||
<input name="anonymous_max_upload_mb" value="{{.Data.Settings.AnonymousMaxUploadMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Anonymous daily upload MB per IP</span>
|
||||
<input name="anonymous_daily_upload_mb" value="{{.Data.Settings.AnonymousDailyUploadMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>User daily upload MB</span>
|
||||
<input name="user_daily_upload_mb" value="{{.Data.Settings.UserDailyUploadMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Default user storage MB</span>
|
||||
<input name="default_user_storage_mb" value="{{.Data.Settings.DefaultUserStorageMB}}" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Usage retention days</span>
|
||||
<input type="number" name="usage_retention_days" min="1" value="{{.Data.Settings.UsageRetentionDays}}" required>
|
||||
</label>
|
||||
<button class="button button-primary" type="submit">Save settings</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
@@ -3,80 +3,110 @@
|
||||
{{define "content"}}
|
||||
<section class="app-shell admin-shell" aria-labelledby="admin-users-title">
|
||||
<aside class="app-sidebar">
|
||||
<a class="sidebar-link" href="/admin">Overview</a>
|
||||
<a class="sidebar-link" href="/admin/files">Files</a>
|
||||
<a class="sidebar-link is-active" href="/admin/users">Users</a>
|
||||
<a class="sidebar-link" href="/admin/settings">Settings</a>
|
||||
<a class="sidebar-link" href="/app">My files</a>
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link" href="/admin">Overview</a>
|
||||
<a class="sidebar-link" href="/admin/files">Files</a>
|
||||
<a class="sidebar-link is-active" href="/admin/users">Users</a>
|
||||
<a class="sidebar-link" href="/admin/settings">Settings</a>
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link" href="/app">My Files</a>
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<form class="sidebar-logout" action="/admin/logout" method="post">
|
||||
<button class="button button-outline" type="submit">Logout</button>
|
||||
<button class="button button-outline" type="submit">Sign out</button>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<div class="app-main">
|
||||
<div class="admin-header">
|
||||
<div>
|
||||
<p class="kicker">Operator console</p>
|
||||
<h1 id="admin-users-title">{{.Data.PageTitle}}</h1>
|
||||
<div class="admin-header">
|
||||
<div>
|
||||
<p class="kicker">Operator console</p>
|
||||
<h1 id="admin-users-title">{{.Data.PageTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h2>Create invite</h2>
|
||||
<p>Copy the generated link and send it manually. SMTP delivery comes later.</p>
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h2>Create invite</h2>
|
||||
<p>Copy the generated link and send it manually. SMTP delivery comes later.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Data.LastInviteURL}}
|
||||
<div class="copy-field">
|
||||
<input type="text" value="{{.Data.LastInviteURL}}" readonly id="invite-url-field" aria-label="Invite link">
|
||||
<button class="button button-outline button-sm" type="button"
|
||||
onclick="navigator.clipboard.writeText(document.getElementById('invite-url-field').value).then(()=>{this.textContent='Copied!';setTimeout(()=>this.textContent='Copy',2000)})">Copy</button>
|
||||
</div>
|
||||
{{end}}
|
||||
<form class="inline-controls" action="/admin/invites" method="post">
|
||||
<label><span>Email</span><input type="email" name="email" required></label>
|
||||
<label><span>Role</span><select name="role"><option value="user">User</option><option value="admin">Admin</option></select></label>
|
||||
<button class="button button-primary" type="submit">Create invite</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header">
|
||||
<h2>Users</h2>
|
||||
<p>Disable accounts or generate reset links.</p>
|
||||
</div>
|
||||
<div class="admin-table-wrap">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
<th>Status</th>
|
||||
<th>Storage</th>
|
||||
<th>Today</th>
|
||||
<th>Joined</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Data.Users}}
|
||||
<tr>
|
||||
<td>{{.Username}}</td>
|
||||
<td>{{.Email}}</td>
|
||||
<td>{{.Role}}</td>
|
||||
<td><span class="badge {{if eq .Status "active"}}badge-active{{else}}badge-disabled{{end}}">{{.Status}}</span></td>
|
||||
<td>{{.StorageUsed}} / {{.StorageQuota}}</td>
|
||||
<td>{{.DailyUsed}}</td>
|
||||
<td>{{.CreatedAt}}</td>
|
||||
<td class="table-actions">
|
||||
{{if eq .Status "disabled"}}
|
||||
<form action="/admin/users/{{.ID}}/disable?disabled=false" method="post">
|
||||
<button class="button button-outline button-sm" type="submit">Reactivate</button>
|
||||
</form>
|
||||
{{else}}
|
||||
<form action="/admin/users/{{.ID}}/disable" method="post">
|
||||
<button class="button button-danger button-sm" type="submit">Disable</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form action="/admin/users/{{.ID}}/reset" method="post">
|
||||
<button class="button button-outline button-sm" type="submit">Reset link</button>
|
||||
</form>
|
||||
<form class="quota-form" action="/admin/users/{{.ID}}/quota" method="post">
|
||||
<input name="storage_quota_mb" placeholder="Quota MB" title="Override storage quota in MB (leave blank to clear override)">
|
||||
<button class="button button-outline button-sm" type="submit">Set</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr><td colspan="8" class="muted-copy">No users yet.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Data.LastInviteURL}}
|
||||
<p class="manage-link"><span>Invite link:</span> <a href="{{.Data.LastInviteURL}}">{{.Data.LastInviteURL}}</a></p>
|
||||
{{end}}
|
||||
<form class="inline-controls" action="/admin/invites" method="post">
|
||||
<label><span>Email</span><input type="email" name="email" required></label>
|
||||
<label><span>Role</span><select name="role"><option value="user">User</option><option value="admin">Admin</option></select></label>
|
||||
<button class="button button-primary" type="submit">Create invite</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header"><h2>Users</h2><p>Disable accounts or create reset links.</p></div>
|
||||
<div class="admin-table-wrap">
|
||||
<table class="admin-table">
|
||||
<thead><tr><th>User</th><th>Email</th><th>Role</th><th>Status</th><th>Storage</th><th>Today</th><th>Joined</th><th>Actions</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Data.Users}}
|
||||
<tr>
|
||||
<td>{{.Username}}</td>
|
||||
<td>{{.Email}}</td>
|
||||
<td>{{.Role}}</td>
|
||||
<td><span class="badge">{{.Status}}</span></td>
|
||||
<td>{{.StorageUsed}} / {{.StorageQuota}}</td>
|
||||
<td>{{.DailyUsed}}</td>
|
||||
<td>{{.CreatedAt}}</td>
|
||||
<td class="table-actions">
|
||||
{{if eq .Status "disabled"}}
|
||||
<form action="/admin/users/{{.ID}}/disable?disabled=false" method="post"><button class="button button-outline" type="submit">Reactivate</button></form>
|
||||
{{else}}
|
||||
<form action="/admin/users/{{.ID}}/disable" method="post"><button class="button button-danger" type="submit">Disable</button></form>
|
||||
{{end}}
|
||||
<form action="/admin/users/{{.ID}}/reset" method="post"><button class="button button-outline" type="submit">Reset link</button></form>
|
||||
<form action="/admin/users/{{.ID}}/quota" method="post">
|
||||
<input class="compact-input" name="storage_quota_mb" placeholder="Quota MB">
|
||||
<button class="button button-outline" type="submit">Quota</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr><td colspan="8">No users yet.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
@@ -3,18 +3,14 @@
|
||||
{{define "content"}}
|
||||
<section class="app-shell" aria-labelledby="dashboard-title">
|
||||
<aside class="app-sidebar">
|
||||
<a class="sidebar-link is-active" href="/app">Dashboard</a>
|
||||
<a class="sidebar-link" href="/account/settings">Settings</a>
|
||||
{{if eq .Data.User.Role "admin"}}<a class="sidebar-link" href="/admin">Admin</a>{{end}}
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-link is-active" href="/app">My Files</a>
|
||||
<a class="sidebar-link" href="/account/settings">Account</a>
|
||||
{{if eq .Data.User.Role "admin"}}<a class="sidebar-link" href="/admin">Admin panel</a>{{end}}
|
||||
</nav>
|
||||
<hr class="sidebar-sep">
|
||||
<form class="sidebar-logout" action="/logout" method="post">
|
||||
<button class="button button-outline" type="submit">Logout</button>
|
||||
</form>
|
||||
<form class="collection-create" action="/app/collections" method="post">
|
||||
<label>
|
||||
<span>New collection</span>
|
||||
<input name="name" placeholder="Projects">
|
||||
</label>
|
||||
<button class="button button-outline" type="submit">Create</button>
|
||||
<button class="button button-outline" type="submit">Sign out</button>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
@@ -22,46 +18,91 @@
|
||||
<div class="admin-header">
|
||||
<div>
|
||||
<p class="kicker">Personal space</p>
|
||||
<h1 id="dashboard-title">My files</h1>
|
||||
<h1 id="dashboard-title">My Files</h1>
|
||||
<p class="muted-copy">{{.Data.StorageUsed}} used · max file size {{.Data.MaxUploadSize}}</p>
|
||||
</div>
|
||||
<a class="button button-primary" href="/">Upload files</a>
|
||||
</div>
|
||||
|
||||
<div class="collection-tabs">
|
||||
<a class="button {{if not .Data.Selected}}button-primary{{else}}button-outline{{end}}" href="/app">All</a>
|
||||
{{range .Data.Collections}}
|
||||
<a class="button {{if eq $.Data.Selected .ID}}button-primary{{else}}button-outline{{end}}" href="/app?collection={{.ID}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
<div class="tabs-bar">
|
||||
<div class="tab-list" role="tablist">
|
||||
<a class="tab {{if not .Data.Selected}}is-active{{end}}" href="/app">All</a>
|
||||
{{range .Data.Collections}}
|
||||
<a class="tab {{if eq $.Data.Selected .ID}}is-active{{end}}" href="/app?collection={{.ID}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<details class="new-collection-drop">
|
||||
<summary class="button button-outline button-sm">+ Collection</summary>
|
||||
<div class="new-collection-body">
|
||||
<form action="/app/collections" method="post">
|
||||
<label>
|
||||
<span>Name</span>
|
||||
<input name="name" placeholder="e.g. Projects" required>
|
||||
</label>
|
||||
<button class="button button-primary button-sm" type="submit">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<div class="card admin-table-card">
|
||||
<div class="card-content">
|
||||
<div class="table-header"><h2>Owned boxes</h2><p>Collections organize boxes. Shared links remain unlisted.</p></div>
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h2>Boxes</h2>
|
||||
<p>Collections organise boxes. Shared links remain unlisted.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin-table-wrap">
|
||||
<table class="admin-table">
|
||||
<thead><tr><th>Title</th><th>Collection</th><th>Files</th><th>Size</th><th>Created</th><th>Expires</th><th>Actions</th></tr></thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Collection</th>
|
||||
<th>Files</th>
|
||||
<th>Size</th>
|
||||
<th>Expires</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Data.Boxes}}
|
||||
<tr>
|
||||
<td class="file-name">{{.Title}}</td>
|
||||
<td>{{if .CollectionName}}{{.CollectionName}}{{else}}Unsorted{{end}}</td>
|
||||
<td>
|
||||
<div class="file-name">{{.Title}}</div>
|
||||
<details class="row-edit">
|
||||
<summary>Rename</summary>
|
||||
<form action="/app/boxes/{{.ID}}/rename" method="post" class="row-edit-form">
|
||||
<input name="title" placeholder="New title">
|
||||
<button class="button button-outline button-sm" type="submit">Save</button>
|
||||
</form>
|
||||
</details>
|
||||
</td>
|
||||
<td>
|
||||
<div>{{if .CollectionName}}{{.CollectionName}}{{else}}<span class="muted-copy">—</span>{{end}}</div>
|
||||
<details class="row-edit">
|
||||
<summary>Move</summary>
|
||||
<form action="/app/boxes/{{.ID}}/move" method="post" class="row-edit-form">
|
||||
<select name="collection_id">
|
||||
<option value="">Unsorted</option>
|
||||
{{range $.Data.Collections}}<option value="{{.ID}}">{{.Name}}</option>{{end}}
|
||||
</select>
|
||||
<button class="button button-outline button-sm" type="submit">Move</button>
|
||||
</form>
|
||||
</details>
|
||||
</td>
|
||||
<td>{{.FileCount}}</td>
|
||||
<td>{{.Size}}</td>
|
||||
<td>{{.CreatedAt}}</td>
|
||||
<td>{{.ExpiresAt}}</td>
|
||||
<td class="table-actions">
|
||||
<a class="button button-outline" href="{{.URL}}" target="_blank" rel="noopener noreferrer">Open</a>
|
||||
<form action="/app/boxes/{{.ID}}/rename" method="post"><input class="compact-input" name="title" placeholder="Rename"><button class="button button-outline" type="submit">Save</button></form>
|
||||
<form action="/app/boxes/{{.ID}}/move" method="post">
|
||||
<select name="collection_id"><option value="">Unsorted</option>{{range $.Data.Collections}}<option value="{{.ID}}">{{.Name}}</option>{{end}}</select>
|
||||
<button class="button button-outline" type="submit">Move</button>
|
||||
<a class="button button-outline button-sm" href="{{.URL}}" target="_blank" rel="noopener noreferrer">Open</a>
|
||||
<form action="/app/boxes/{{.ID}}/delete" method="post">
|
||||
<button class="button button-danger button-sm" type="submit">Delete</button>
|
||||
</form>
|
||||
<form action="/app/boxes/{{.ID}}/delete" method="post"><button class="button button-danger" type="submit">Delete</button></form>
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr><td colspan="7">You have no boxes yet.</td></tr>
|
||||
<tr><td colspan="6" class="muted-copy">No boxes yet. Upload some files to get started.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -3,8 +3,13 @@
|
||||
{{define "content"}}
|
||||
<section class="upload-view" aria-labelledby="upload-title">
|
||||
<div class="hero-copy">
|
||||
{{if .CurrentUser}}
|
||||
<h1 id="upload-title">Upload files.</h1>
|
||||
<p>{{.Data.LimitSummary}}</p>
|
||||
{{else}}
|
||||
<h1 id="upload-title">Send a file. Get a link.</h1>
|
||||
<p>Anonymous, self-hosted transfers. No account required.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<form class="upload-panel card" id="upload-form" action="/api/v1/upload" method="post" enctype="multipart/form-data">
|
||||
|
||||
Reference in New Issue
Block a user