package templates templ AdminLibrary(user User, libraries []LibraryData, users []User) { Library Management - Bookhoard @Header(user, "/admin/library")
@Icon("library", "h-5 w-5")

Libraries

Manage media libraries, folders, and scanning

@LibraryList(user, libraries, users)
} templ LibraryList(user User, libraries []LibraryData, users []User) { if len(libraries) == 0 {
@Icon("library", "h-7 w-7")

No Libraries Yet

Create your first library to get started

} else {
for _, library := range libraries {
@Icon("library", "h-5 w-5")

{ library.Name }

if library.Description != "" {

{ library.Description }

}
@Icon("tag", "h-3 w-3") { library.TypeName } if library.FolderCount > 0 { @Icon("folder", "h-3 w-3") { library.FolderCount } folders }
}
}
} templ LibraryPanel(user User, libraryID string, library LibraryData, folders []FolderData, users []User, visibility []UserVisibilityData, issueCount int) {
@Icon("folder", "h-4 w-4 shrink-0")

Folders

if len(folders) == 0 {

No folders configured. Add a folder to enable scanning.

} else {
for _, folder := range folders {
{ folder.FolderPath }
}
}
if len(users) > 0 {
@Icon("users", "h-4 w-4 shrink-0")

User Access

for _, u := range users { }
} if issueCount > 0 {
@Icon("alert", "h-4 w-4") if issueCount == 1 { 1 processing issue } else { { issueCount } processing issues } @Icon("chevron-right", "h-4 w-4")
}
} templ FolderBrowserContent(currentPath string, parentPath string, entries []DirEntry, targetInput string, libraryID string) {
@Icon("folder", "h-4 w-4 shrink-0") { currentPath }
if parentPath != "" { }
for _, entry := range entries { }
}