Apply the new design-system primitives across the remaining pages so the whole app shares one visual language: - Auth/entry: redesigned index, login, register (centered card layout, SVG icons, semantic tokens) - Admin: sidebar nav with icons, cohesive admin dashboard/users/library/ processing-issues/settings (tables use border-line + hover states; scan/websocket attributes preserved) - Secondary: analytics (stat cards), devices, progress, conflicts, queue, profile + form/modal all migrated to .card/.btn/.input primitives and SVG action icons - Docs + API explorer + setup wizard + collection/rules/modals + unlinked books + book-detail modals: consistent chrome, modal scrims use --surface-overlay, close buttons use icon-btn - reader.templ and error.templ intentionally left unchanged
96 lines
3.4 KiB
Templ
96 lines
3.4 KiB
Templ
|
|
package templates
|
|
|
|
templ AdminProcessingIssues(user User, libraryID string, issues []ProcessingIssueData, stats IssueStats) {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<title>Processing Issues - Bookhoard</title>
|
|
<link href="/static/style.css" rel="stylesheet"/>
|
|
</head>
|
|
<body x-data="processingIssues" x-init="initializeProcessingIssues('{ libraryID }')" class="theme-{ user.Theme }">
|
|
@Header(user, "/admin/libraries/"+libraryID)
|
|
<main class="flex-1 p-6 sm:p-8">
|
|
<div class="mb-8">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div>
|
|
<h1 class="text-2xl font-bold tracking-tight text-content mb-2">Processing Issues</h1>
|
|
<p class="text-content-muted">Items that couldn't be processed in this library</p>
|
|
</div>
|
|
<a href="/admin/libraries/{ libraryID }" class="btn btn-secondary">
|
|
@Icon("arrow-left", "h-4 w-4")
|
|
Back to Library
|
|
</a>
|
|
</div>
|
|
</div>
|
|
if stats.ErrorCount > 0 || stats.WarningCount > 0 || stats.InfoCount > 0 {
|
|
<!-- Stats Cards -->
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
|
if stats.ErrorCount > 0 {
|
|
<div class="card p-6 border-l-4 border-red-500">
|
|
<h3 class="text-lg font-semibold text-red-600 mb-2">Errors</h3>
|
|
<p class="text-3xl font-bold text-content">{ stats.ErrorCount }</p>
|
|
</div>
|
|
}
|
|
if stats.WarningCount > 0 {
|
|
<div class="card p-6 border-l-4 border-yellow-500">
|
|
<h3 class="text-lg font-semibold text-yellow-600 mb-2">Warnings</h3>
|
|
<p class="text-3xl font-bold text-content">{ stats.WarningCount }</p>
|
|
</div>
|
|
}
|
|
if stats.InfoCount > 0 {
|
|
<div class="card p-6 border-l-4 border-blue-500">
|
|
<h3 class="text-lg font-semibold text-blue-600 mb-2">Info</h3>
|
|
<p class="text-3xl font-bold text-content">{ stats.InfoCount }</p>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
if len(issues) == 0 {
|
|
<div class="card p-8 text-center">
|
|
<p class="text-content-muted">No processing issues found for this library.</p>
|
|
</div>
|
|
} else {
|
|
<!-- Issues List -->
|
|
<div class="space-y-4">
|
|
for _, issue := range issues {
|
|
<div class="card p-6">
|
|
<div class="flex justify-between items-start mb-4">
|
|
<div class="flex-1">
|
|
<h4 class="text-lg font-semibold mb-2 text-content">{ issue.Title }</h4>
|
|
<p class="text-content mb-3">{ issue.IssueDescription }</p>
|
|
<div class="text-sm text-content-muted space-y-1">
|
|
<p><strong>Type:</strong> { issue.IssueType }</p>
|
|
<p><strong>Format:</strong> { issue.FormatGroup }</p>
|
|
<p><strong>File:</strong> { issue.FilePath }</p>
|
|
<p><strong>Library:</strong> { issue.LibraryTypeName }</p>
|
|
</div>
|
|
</div>
|
|
<div class="ml-4">
|
|
<span
|
|
class="inline-block px-3 py-1 text-sm rounded-full font-medium bg-brand text-white"
|
|
>
|
|
{ issue.Severity }
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-3 mt-4">
|
|
if issue.Severity == "warning" || issue.Severity == "info" {
|
|
<button
|
|
@click="dismissIssue('{ issue.ID }', '{ issue.MediaItemID }')"
|
|
class="btn btn-secondary text-sm"
|
|
>
|
|
Dismiss
|
|
</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</main>
|
|
</body>
|
|
</html>
|
|
}
|