feat(#145): update home page server load for dashboard mode
- Add isDashboard flag (true when no search filters active) - In dashboard mode: fetch mentions, incompleteDocs, recentDocs via Promise.allSettled so widget failures don't crash the page - In search mode: skip widget fetches for performance - Replace incomplete-count fetch with list fetch (derive count from list.length) - Update enrich page to use IncompleteDocumentDTO (id + title only) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,14 +5,6 @@ let { data } = $props();
|
||||
|
||||
const documents = $derived(data.documents);
|
||||
const count = $derived(documents.length);
|
||||
|
||||
function formatUploadDate(createdAt: string): string {
|
||||
return new Intl.DateTimeFormat('de-DE', {
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
year: 'numeric'
|
||||
}).format(new Date(createdAt));
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="mx-auto max-w-4xl px-4 py-10">
|
||||
@@ -85,10 +77,7 @@ function formatUploadDate(createdAt: string): string {
|
||||
<p
|
||||
class="font-serif text-lg font-medium text-ink decoration-accent decoration-2 underline-offset-4 group-hover:underline"
|
||||
>
|
||||
{doc.title || doc.originalFilename}
|
||||
</p>
|
||||
<p class="mt-1 font-sans text-xs text-ink-3">
|
||||
{formatUploadDate(doc.createdAt)}
|
||||
{doc.title}
|
||||
</p>
|
||||
</div>
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user