2026-05-30 17:23:20 +03:00
|
|
|
{{define "admin_settings.html"}}{{template "base" .}}{{end}}
|
|
|
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
|
<section class="app-shell admin-shell" aria-labelledby="admin-settings-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" href="/admin">{{template "icon-dashboard" .}}<span>Overview</span></a>
|
|
|
|
|
<a class="sidebar-link" 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 is-active" 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-30 18:17:13 +03:00
|
|
|
<div class="admin-header">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="kicker">Operator console</p>
|
|
|
|
|
<h1 id="admin-settings-title">{{.Data.PageTitle}}</h1>
|
|
|
|
|
</div>
|
2026-05-30 17:23:20 +03:00
|
|
|
</div>
|
|
|
|
|
|
2026-05-30 18:17:13 +03:00
|
|
|
<div class="card admin-table-card">
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="table-header">
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Upload policy</h2>
|
2026-05-31 14:01:38 +03:00
|
|
|
<p>Admin users bypass all upload caps. Values are in megabytes; use -1 for unlimited upload size or daily upload caps.</p>
|
2026-05-30 18:17:13 +03:00
|
|
|
</div>
|
2026-05-30 17:23:20 +03:00
|
|
|
</div>
|
|
|
|
|
|
2026-05-30 18:17:13 +03:00
|
|
|
<form class="settings-form" action="/admin/settings" 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
|
|
|
<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>
|
2026-05-31 02:14:10 +03:00
|
|
|
<label>
|
|
|
|
|
<span>Daily boxes per IP</span>
|
|
|
|
|
<input type="number" name="anonymous_daily_boxes" min="1" value="{{.Data.Settings.AnonymousDailyBoxes}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Active boxes per IP</span>
|
|
|
|
|
<input type="number" name="anonymous_active_boxes" min="1" value="{{.Data.Settings.AnonymousActiveBoxes}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Max expiration (days)</span>
|
|
|
|
|
<input type="number" name="anonymous_max_days" min="1" value="{{.Data.Settings.AnonymousMaxDays}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Anonymous storage backend</span>
|
|
|
|
|
<select name="anonymous_storage_backend" required>
|
|
|
|
|
{{range .Data.Storage}}
|
|
|
|
|
{{if or .Config.Enabled (eq $.Data.Settings.AnonymousStorageBackend .Config.ID)}}<option value="{{.Config.ID}}" {{if eq $.Data.Settings.AnonymousStorageBackend .Config.ID}}selected{{end}}>{{.Config.Name}} ({{.Config.ID}})</option>{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</select>
|
|
|
|
|
</label>
|
2026-05-30 18:17:13 +03:00
|
|
|
</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>
|
2026-05-31 02:14:10 +03:00
|
|
|
<label>
|
|
|
|
|
<span>Daily boxes</span>
|
|
|
|
|
<input type="number" name="user_daily_boxes" min="1" value="{{.Data.Settings.UserDailyBoxes}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Active boxes</span>
|
|
|
|
|
<input type="number" name="user_active_boxes" min="1" value="{{.Data.Settings.UserActiveBoxes}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Max expiration (days)</span>
|
|
|
|
|
<input type="number" name="user_max_days" min="1" value="{{.Data.Settings.UserMaxDays}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>User storage backend</span>
|
|
|
|
|
<select name="user_storage_backend" required>
|
|
|
|
|
{{range .Data.Storage}}
|
|
|
|
|
{{if or .Config.Enabled (eq $.Data.Settings.UserStorageBackend .Config.ID)}}<option value="{{.Config.ID}}" {{if eq $.Data.Settings.UserStorageBackend .Config.ID}}selected{{end}}>{{.Config.Name}} ({{.Config.ID}})</option>{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</select>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Local storage max (GB)</span>
|
|
|
|
|
<input name="local_storage_max_gb" value="{{.Data.Settings.LocalStorageMaxGB}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Short-window requests</span>
|
|
|
|
|
<input type="number" name="short_window_requests" min="1" value="{{.Data.Settings.ShortWindowRequests}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>Short-window seconds</span>
|
|
|
|
|
<input type="number" name="short_window_seconds" min="1" value="{{.Data.Settings.ShortWindowSeconds}}" required>
|
|
|
|
|
</label>
|
2026-05-30 18:17:13 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<button class="button button-primary" type="submit">Save settings</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2026-05-30 17:23:20 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
{{end}}
|