feat(admin): redesign library management with HTMX expandable rows + stats dashboard
Library management: - Redesign admin_library page with expandable rows that load detail panels via HTMX (LibraryList, LibraryPanel, FolderBrowserContent partials) - Add create/edit/delete library modals using data-* attributes - Add folder browser modal with inline add/remove via HTMX - Add user visibility checkboxes toggled via HTMX - New endpoints in admin_library.go: create, update, delete, panel, folders add/remove, browse, visibility - New template types: FolderData, DirEntry, UserVisibilityData, AdminStats; extend LibraryData with TypeValue and FolderCount Admin dashboard: - Rewrite admin.templ to show 4-stat grid (libraries, media, users, devices) - Add getAdminStats helper querying library/user/media/device counts - Pass AdminStats to template from both /admin and /admin/ handlers
This commit is contained in:
@@ -38,7 +38,32 @@ type LibraryData struct {
|
||||
Name string
|
||||
Description string
|
||||
TypeName string
|
||||
TypeValue string
|
||||
MediaCount int64
|
||||
FolderCount int
|
||||
}
|
||||
|
||||
type FolderData struct {
|
||||
FolderPath string
|
||||
}
|
||||
|
||||
type DirEntry struct {
|
||||
Name string
|
||||
Path string
|
||||
}
|
||||
|
||||
type UserVisibilityData struct {
|
||||
UserID string
|
||||
Username string
|
||||
Email string
|
||||
IsVisible bool
|
||||
}
|
||||
|
||||
type AdminStats struct {
|
||||
LibraryCount int
|
||||
MediaCount int
|
||||
UserCount int
|
||||
DeviceCount int
|
||||
}
|
||||
|
||||
type SeriesCardData struct {
|
||||
|
||||
Reference in New Issue
Block a user