2026-05-25 16:52:57 +03:00
|
|
|
{{define "admin.html"}}{{template "base" .}}{{end}}
|
|
|
|
|
|
|
|
|
|
{{define "content"}}
|
2026-05-30 17:23:20 +03:00
|
|
|
<section class="app-shell admin-shell" aria-labelledby="admin-title">
|
|
|
|
|
<aside class="app-sidebar">
|
2026-05-30 18:17:13 +03:00
|
|
|
<nav class="sidebar-nav">
|
feat(admin): redesign storage backend management UI
Implement a new card-based UI for managing storage backends in the admin panel. This update improves the visual presentation and usability of the storage configuration page.
Key changes:
- Added comprehensive CSS styles for storage cards, including status indicators, metadata layouts, and action buttons.
- Updated the storage admin template to render storage configurations as cards with type-specific details (Local, S3, SFTP, SMB, WebDAV).
- Integrated inline actions for testing, editing, disabling, and deleting storage backends.
- Enhanced sidebar link alignment with flexbox.
2026-05-31 04:54:27 +03:00
|
|
|
<a class="sidebar-link {{if eq .Data.Section "overview"}}is-active{{end}}" href="/admin">{{template "icon-dashboard" .}}<span>Overview</span></a>
|
|
|
|
|
<a class="sidebar-link {{if eq .Data.Section "files"}}is-active{{end}}" href="/admin/files">{{template "icon-folder" .}}<span>Files</span></a>
|
|
|
|
|
<a class="sidebar-link" href="/admin/users">{{template "icon-user-circle" .}}<span>Users</span></a>
|
|
|
|
|
<a class="sidebar-link" href="/admin/settings">{{template "icon-settings" .}}<span>Settings</span></a>
|
|
|
|
|
<a class="sidebar-link" href="/admin/storage">{{template "icon-database" .}}<span>Storage</span></a>
|
2026-05-31 21:52:56 +03:00
|
|
|
<a class="sidebar-link" href="/admin/logs">{{template "icon-database" .}}<span>Logs</span></a>
|
|
|
|
|
<a class="sidebar-link" href="/admin/bans">{{template "icon-settings" .}}<span>Bans</span></a>
|
2026-05-30 18:17:13 +03:00
|
|
|
</nav>
|
|
|
|
|
<hr class="sidebar-sep">
|
|
|
|
|
<nav class="sidebar-nav">
|
feat(admin): redesign storage backend management UI
Implement a new card-based UI for managing storage backends in the admin panel. This update improves the visual presentation and usability of the storage configuration page.
Key changes:
- Added comprehensive CSS styles for storage cards, including status indicators, metadata layouts, and action buttons.
- Updated the storage admin template to render storage configurations as cards with type-specific details (Local, S3, SFTP, SMB, WebDAV).
- Integrated inline actions for testing, editing, disabling, and deleting storage backends.
- Enhanced sidebar link alignment with flexbox.
2026-05-31 04:54:27 +03:00
|
|
|
<a class="sidebar-link" href="/app">{{template "icon-home-simple" .}}<span>My Files</span></a>
|
2026-05-30 18:17:13 +03:00
|
|
|
</nav>
|
|
|
|
|
<hr class="sidebar-sep">
|
2026-05-30 17:23:20 +03:00
|
|
|
<form class="sidebar-logout" action="/admin/logout" method="post">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
feat(admin): redesign storage backend management UI
Implement a new card-based UI for managing storage backends in the admin panel. This update improves the visual presentation and usability of the storage configuration page.
Key changes:
- Added comprehensive CSS styles for storage cards, including status indicators, metadata layouts, and action buttons.
- Updated the storage admin template to render storage configurations as cards with type-specific details (Local, S3, SFTP, SMB, WebDAV).
- Integrated inline actions for testing, editing, disabling, and deleting storage backends.
- Enhanced sidebar link alignment with flexbox.
2026-05-31 04:54:27 +03:00
|
|
|
<button class="button button-outline" type="submit">{{template "icon-log-out" .}}<span>Sign out</span></button>
|
2026-05-30 17:23:20 +03:00
|
|
|
</form>
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
|
<div class="app-main">
|
2026-05-25 16:52:57 +03:00
|
|
|
<div class="admin-header">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="kicker">Operator console</p>
|
2026-05-30 17:23:20 +03:00
|
|
|
<h1 id="admin-title">{{.Data.PageTitle}}</h1>
|
2026-05-25 16:52:57 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="metric-grid">
|
|
|
|
|
<article class="metric-card">
|
|
|
|
|
<span>Total boxes</span>
|
|
|
|
|
<strong>{{.Data.Stats.TotalBoxes}}</strong>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="metric-card">
|
|
|
|
|
<span>Total files</span>
|
|
|
|
|
<strong>{{.Data.Stats.TotalFiles}}</strong>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="metric-card">
|
|
|
|
|
<span>Storage used</span>
|
|
|
|
|
<strong>{{.Data.Stats.TotalSizeLabel}}</strong>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="metric-card">
|
|
|
|
|
<span>Uploads 24h</span>
|
|
|
|
|
<strong>{{.Data.Stats.UploadsLast24H}}</strong>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="metric-card">
|
|
|
|
|
<span>Protected</span>
|
|
|
|
|
<strong>{{.Data.Stats.ProtectedBoxes}}</strong>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="metric-card">
|
|
|
|
|
<span>Expired</span>
|
|
|
|
|
<strong>{{.Data.Stats.ExpiredBoxes}}</strong>
|
|
|
|
|
</article>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="card admin-table-card">
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="table-header">
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Recent uploads</h2>
|
|
|
|
|
<p>View or remove anonymous boxes.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<a class="button button-outline" href="/admin/files">View all</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="admin-table-wrap">
|
|
|
|
|
<table class="admin-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Box</th>
|
2026-05-30 15:42:35 +03:00
|
|
|
<th>Owner</th>
|
2026-05-25 16:52:57 +03:00
|
|
|
<th>Files</th>
|
|
|
|
|
<th>Size</th>
|
|
|
|
|
<th>Downloads</th>
|
|
|
|
|
<th>Created</th>
|
|
|
|
|
<th>Expires</th>
|
|
|
|
|
<th>Status</th>
|
|
|
|
|
<th>Actions</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{{range .Data.Boxes}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>{{.ID}}</code></td>
|
2026-05-30 15:42:35 +03:00
|
|
|
<td>{{.Owner}}</td>
|
2026-05-25 16:52:57 +03:00
|
|
|
<td>{{.FileCount}}</td>
|
|
|
|
|
<td>{{.TotalSizeLabel}}</td>
|
|
|
|
|
<td>{{.DownloadCount}}{{if .MaxDownloads}} / {{.MaxDownloads}}{{end}}</td>
|
|
|
|
|
<td>{{.CreatedAt}}</td>
|
|
|
|
|
<td>{{.ExpiresAt}}</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{if .Expired}}<span class="badge">expired</span>{{else}}<span class="badge">active</span>{{end}}
|
|
|
|
|
{{if .Protected}}<span class="badge">protected</span>{{end}}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="table-actions">
|
2026-05-25 17:05:59 +03:00
|
|
|
<a class="button button-outline" href="/admin/boxes/{{.ID}}/view">View</a>
|
2026-05-25 16:52:57 +03:00
|
|
|
<form action="/admin/boxes/{{.ID}}/delete" method="post">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
2026-05-25 16:52:57 +03:00
|
|
|
<button class="button button-danger" type="submit">Delete</button>
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{else}}
|
2026-05-30 15:42:35 +03:00
|
|
|
<tr><td colspan="9">No uploads yet.</td></tr>
|
2026-05-25 16:52:57 +03:00
|
|
|
{{end}}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-30 17:23:20 +03:00
|
|
|
</div>
|
2026-05-25 16:52:57 +03:00
|
|
|
</section>
|
|
|
|
|
{{end}}
|