Dashboard: narrower categories column, show scan time in recent docs, add inou/sophia categories

This commit is contained in:
James 2026-02-10 03:48:20 -05:00
parent b3bb615075
commit 3a6aa8cbda
2 changed files with 7 additions and 4 deletions

View File

@ -40,7 +40,8 @@ func initPaths() {
var categories = []string{ var categories = []string{
"taxes", "bills", "medical", "insurance", "legal", "taxes", "bills", "medical", "insurance", "legal",
"financial", "expenses", "vehicles", "home", "personal", "contacts", "uncategorized", "financial", "expenses", "vehicles", "home", "personal", "contacts",
"inou", "sophia", "uncategorized",
} }
func main() { func main() {
@ -137,6 +138,8 @@ func categoryIcon(cat string) string {
"home": "🏠", "home": "🏠",
"personal": "👤", "personal": "👤",
"contacts": "📇", "contacts": "📇",
"inou": "🏢",
"sophia": "👧",
"uncategorized": "📁", "uncategorized": "📁",
} }
if icon, ok := icons[cat]; ok { if icon, ok := icons[cat]; ok {

View File

@ -90,7 +90,7 @@
</div> </div>
<!-- Two columns: Categories + Recent --> <!-- Two columns: Categories + Recent -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
<!-- Categories --> <!-- Categories -->
<div class="lg:col-span-1"> <div class="lg:col-span-1">
<h2 class="text-xl font-semibold text-gray-900 dark:text-white mb-4">Categories</h2> <h2 class="text-xl font-semibold text-gray-900 dark:text-white mb-4">Categories</h2>
@ -111,7 +111,7 @@
</div> </div>
<!-- Recent Documents --> <!-- Recent Documents -->
<div class="lg:col-span-2"> <div class="lg:col-span-3">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-semibold text-gray-900 dark:text-white">Recent Documents</h2> <h2 class="text-xl font-semibold text-gray-900 dark:text-white">Recent Documents</h2>
<a href="/browse" class="text-sm text-brand-600 dark:text-brand-400 hover:underline">View all →</a> <a href="/browse" class="text-sm text-brand-600 dark:text-brand-400 hover:underline">View all →</a>
@ -154,7 +154,7 @@
{{title .Category}} {{title .Category}}
</span> </span>
{{end}} {{end}}
<p class="text-xs text-gray-400 dark:text-gray-500 mt-1">{{if .Date}}{{.Date}}{{else}}{{formatDate .ProcessedAt}}{{end}}</p> <p class="text-xs text-gray-400 dark:text-gray-500 mt-1">{{formatDate .ProcessedAt}}</p>
</div> </div>
</a> </a>
{{end}} {{end}}