2026-05-31 02:14:10 +03:00
{{define "admin_user_edit.html"}}{{template "base" .}}{{end}}
{{define "content"}}
< section class = "app-shell admin-shell" aria-labelledby = "admin-user-edit-title" >
< aside class = "app-sidebar" >
< 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 is-active" 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-31 02:14:10 +03:00
< / nav >
< hr class = "sidebar-sep" >
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
< nav class = "sidebar-nav" > < a class = "sidebar-link" href = "/app" > {{template "icon-home-simple" .}}< span > My Files< / span > < / a > < / nav >
2026-05-31 02:14:10 +03:00
< hr class = "sidebar-sep" >
< form class = "sidebar-logout" action = "/admin/logout" method = "post" >
< 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-31 02:14:10 +03:00
< / form >
< / aside >
< div class = "app-main" >
< div class = "admin-header" >
< div >
< p class = "kicker" > Operator console< / p >
< h1 id = "admin-user-edit-title" > {{.Data.PageTitle}}< / h1 >
< p class = "muted-copy" > {{.Data.UserEdit.Email}} · {{.Data.UserEdit.Role}}< / p >
< / div >
< a class = "button button-outline" href = "/admin/users" > Back to users< / a >
< / div >
{{if .Data.Error}}< p class = "form-error" > {{.Data.Error}}< / p > {{end}}
{{if .Data.LastInviteURL}}
< div class = "copy-field" >
< input type = "text" value = "{{.Data.LastInviteURL}}" readonly id = "reset-url-field" aria-label = "Reset link" >
< button class = "button button-outline button-sm" type = "button"
onclick="navigator.clipboard.writeText(document.getElementById('reset-url-field').value).then(()=>{this.textContent='Copied!';setTimeout(()=>this.textContent='Copy',2000)})">Copy reset link< / button >
< / div >
{{end}}
2026-05-31 14:01:38 +03:00
< div class = "metric-grid user-edit-metrics" >
2026-05-31 02:14:10 +03:00
< article class = "metric-card" > < span > Storage used< / span > < strong > {{.Data.UserEdit.StorageUsed}}< / strong > < / article >
< article class = "metric-card" > < span > Uploaded today< / span > < strong > {{.Data.UserEdit.DailyUsed}}< / strong > < / article >
< article class = "metric-card" > < span > Effective quota< / span > < strong > {{.Data.UserEdit.EffectiveStorage}}< / strong > < / article >
< article class = "metric-card" > < span > Effective backend< / span > < strong > {{.Data.UserEdit.EffectiveBackend}}< / strong > < / article >
< / div >
< div class = "card admin-table-card" >
< div class = "card-content" >
< div class = "table-header" >
< div >
< h2 > Identity and limits< / h2 >
2026-05-31 22:40:48 +03:00
< p > Blank limit fields inherit the global user defaults. Use < code > -1< / code > for unlimited in any limit field — upload size, daily caps, storage quota, max expiration (the box can then last forever), daily boxes, active boxes, and short-window requests. Storage quota < code > 0< / code > also means unlimited.< / p >
2026-05-31 02:14:10 +03:00
< / div >
< / div >
< form class = "settings-form" action = "/admin/users/{{.Data.UserEdit.ID}}/edit" method = "post" >
< input type = "hidden" name = "csrf_token" value = "{{.CSRFToken}}" >
< div class = "settings-section" >
< h3 class = "settings-section-title" > Account< / h3 >
< label > < span > Username< / span > < input name = "username" value = "{{.Data.UserEdit.Username}}" required > < / label >
< label > < span > Email< / span > < input type = "email" name = "email" value = "{{.Data.UserEdit.Email}}" required > < / label >
< label > < span > Role< / span > < select name = "role" >
< option value = "user" { { if eq . Data . UserEdit . Role " user " } } selected { { end } } > User< / option >
< option value = "admin" { { if eq . Data . UserEdit . Role " admin " } } selected { { end } } > Admin< / option >
< / select > < / label >
< label > < span > Status< / span > < select name = "status" >
< option value = "active" { { if eq . Data . UserEdit . Status " active " } } selected { { end } } > Active< / option >
< option value = "disabled" { { if eq . Data . UserEdit . Status " disabled " } } selected { { end } } > Disabled< / option >
< / select > < / label >
< / div >
< div class = "settings-section" >
< h3 class = "settings-section-title" > Storage< / h3 >
< label >
< span > Storage backend< / span >
< select name = "storage_backend_id" >
< option value = "" > Inherit global user backend ({{.Data.UserEdit.EffectiveBackend}})< / option >
{{range .Data.Storage}}
{{if or .Config.Enabled (eq $.Data.UserEdit.StorageBackendID .Config.ID)}}< option value = "{{.Config.ID}}" { { if eq $ . Data . UserEdit . StorageBackendID . Config . ID } } selected { { end } } > {{.Config.Name}} ({{.Config.ID}})< / option > {{end}}
{{end}}
< / select >
< / label >
< label > < span > Storage quota override (MB)< / span > < input name = "storage_quota_mb" value = "{{.Data.UserEdit.StorageQuotaMB}}" placeholder = "inherit" > < / label >
< / div >
< div class = "settings-section" >
< h3 class = "settings-section-title" > Upload limits< / h3 >
< label > < span > Max upload size (MB)< / span > < input name = "max_upload_mb" value = "{{.Data.UserEdit.MaxUploadMB}}" placeholder = "inherit" > < / label >
< label > < span > Daily upload cap (MB)< / span > < input name = "daily_upload_mb" value = "{{.Data.UserEdit.DailyUploadMB}}" placeholder = "inherit" > < / label >
2026-05-31 22:40:48 +03:00
< label > < span > Max expiration (days)< / span > < input type = "number" min = "-1" name = "max_days" value = "{{.Data.UserEdit.MaxDays}}" placeholder = "inherit" > < / label >
< label > < span > Daily boxes< / span > < input type = "number" min = "-1" name = "daily_boxes" value = "{{.Data.UserEdit.DailyBoxes}}" placeholder = "inherit" > < / label >
< label > < span > Active boxes< / span > < input type = "number" min = "-1" name = "active_boxes" value = "{{.Data.UserEdit.ActiveBoxes}}" placeholder = "inherit" > < / label >
< label > < span > Short-window requests< / span > < input type = "number" min = "-1" name = "short_window_requests" value = "{{.Data.UserEdit.ShortWindowRequests}}" placeholder = "inherit" > < / label >
2026-05-31 02:14:10 +03:00
< / div >
< button class = "button button-primary" type = "submit" > Save user< / button >
< / form >
< / div >
< / div >
< div class = "card admin-table-card" >
< div class = "card-content" >
< div class = "table-header" >
< div >
< h2 > Password reset< / h2 >
< p > Create a copyable reset link for this user.< / p >
< / div >
< / div >
< form action = "/admin/users/{{.Data.UserEdit.ID}}/reset?next=edit" method = "post" >
< input type = "hidden" name = "csrf_token" value = "{{.CSRFToken}}" >
< button class = "button button-outline" type = "submit" > Generate reset link< / button >
< / form >
< / div >
< / div >
< / div >
< / section >
{{end}}