2026-05-30 15:42:35 +03:00
|
|
|
{{define "dashboard.html"}}{{template "base" .}}{{end}}
|
|
|
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
|
<section class="app-shell" aria-labelledby="dashboard-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 is-active" href="/app">{{template "icon-home-simple" .}}<span>My Files</span></a>
|
|
|
|
|
<a class="sidebar-link" href="/account/settings">{{template "icon-user-circle" .}}<span>Account</span></a>
|
|
|
|
|
{{if eq .Data.User.Role "admin"}}<a class="sidebar-link" href="/admin">{{template "icon-dashboard" .}}<span>Admin panel</span></a>{{end}}
|
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="/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 15:42:35 +03:00
|
|
|
</form>
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
|
<div class="app-main">
|
|
|
|
|
<div class="admin-header">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="kicker">Personal space</p>
|
2026-05-30 18:17:13 +03:00
|
|
|
<h1 id="dashboard-title">My Files</h1>
|
2026-05-30 15:42:35 +03:00
|
|
|
<p class="muted-copy">{{.Data.StorageUsed}} used · max file size {{.Data.MaxUploadSize}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<a class="button button-primary" href="/">Upload files</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-05-30 18:17:13 +03:00
|
|
|
<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">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
2026-05-30 18:17:13 +03:00
|
|
|
<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>
|
2026-05-30 15:42:35 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="card admin-table-card">
|
|
|
|
|
<div class="card-content">
|
2026-05-30 18:17:13 +03:00
|
|
|
<div class="table-header">
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Boxes</h2>
|
|
|
|
|
<p>Collections organise boxes. Shared links remain unlisted.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-30 15:42:35 +03:00
|
|
|
<div class="admin-table-wrap">
|
|
|
|
|
<table class="admin-table">
|
2026-05-30 18:17:13 +03:00
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Title</th>
|
|
|
|
|
<th>Collection</th>
|
|
|
|
|
<th>Files</th>
|
|
|
|
|
<th>Size</th>
|
|
|
|
|
<th>Expires</th>
|
|
|
|
|
<th>Actions</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
2026-05-30 15:42:35 +03:00
|
|
|
<tbody>
|
|
|
|
|
{{range .Data.Boxes}}
|
|
|
|
|
<tr>
|
2026-05-30 18:17:13 +03:00
|
|
|
<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">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
2026-05-30 18:17:13 +03:00
|
|
|
<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">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
2026-05-30 18:17:13 +03:00
|
|
|
<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>
|
2026-05-30 15:42:35 +03:00
|
|
|
<td>{{.FileCount}}</td>
|
|
|
|
|
<td>{{.Size}}</td>
|
|
|
|
|
<td>{{.ExpiresAt}}</td>
|
|
|
|
|
<td class="table-actions">
|
2026-05-30 18:17:13 +03:00
|
|
|
<a class="button button-outline button-sm" href="{{.URL}}" target="_blank" rel="noopener noreferrer">Open</a>
|
|
|
|
|
<form action="/app/boxes/{{.ID}}/delete" method="post">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
2026-05-30 18:17:13 +03:00
|
|
|
<button class="button button-danger button-sm" type="submit">Delete</button>
|
2026-05-30 15:42:35 +03:00
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{else}}
|
2026-05-30 18:17:13 +03:00
|
|
|
<tr><td colspan="6" class="muted-copy">No boxes yet. Upload some files to get started.</td></tr>
|
2026-05-30 15:42:35 +03:00
|
|
|
{{end}}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
{{end}}
|