feat: complete memorial website features
- Add user contribution system (memories, timeline entries) - Add AI content moderation with Ollama (bad word detection + qwen3:4b) - Add family photo/video upload with admin approval - Add candle lighting feature - Add timeline and recipe sections - Add QR code page and OG image - Add site authentication (password-protected access) - Add proxy middleware for auth routing - Add admin dashboard for content management - Remove email fields, make name optional (default: Anonym) - Add CI/CD pipeline for Gitea Actions - Add Docker deployment configuration - Optimize Ollama RAM usage (42GB → 2.9GB) - Fix API routes accessibility through proxy middleware Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
This patch needs to be inserted after line 1122 (end of timeline.map loop) in src/app/admin/page.tsx:
|
||||
|
||||
|
||||
{/* Timeline Contributions (from visitors) */}
|
||||
<div className="mt-8 pt-6 border-t border-warm-border">
|
||||
<h3 className="font-cormorant italic text-2xl text-warm-brown mb-4">
|
||||
Beiträge von Besuchern
|
||||
</h3>
|
||||
<div className="space-y-3">
|
||||
{timelineContributions.filter(c => c.type === 'timeline').length === 0 ? (
|
||||
<p className="text-warm-brown-light text-sm italic font-lora">Keine Besucherbeiträge.</p>
|
||||
) : (
|
||||
timelineContributions
|
||||
.filter(c => c.type === 'timeline')
|
||||
.sort((a, b) => {
|
||||
if (a.status === 'flagged' && b.status !== 'flagged') return -1
|
||||
if (a.status !== 'flagged' && b.status === 'flagged') return 1
|
||||
if (a.status === 'pending' && b.status !== 'pending') return -1
|
||||
if (a.status !== 'pending' && b.status === 'pending') return 1
|
||||
return new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
|
||||
})
|
||||
.map((contribution) => {
|
||||
const photos = contribution.media_filenames ? contribution.media_filenames.split(',') : []
|
||||
|
||||
return (
|
||||
<div
|
||||
key={contribution.id}
|
||||
className={`rounded-xl p-4 border ${
|
||||
contribution.status === 'flagged'
|
||||
? 'bg-red-50 border-red-300'
|
||||
: contribution.status === 'pending'
|
||||
? 'bg-amber-50 border-amber-200'
|
||||
: 'bg-white/60 border-warm-border'
|
||||
}`}
|
||||
>
|
||||
{editingContribution?.id === contribution.id ? (
|
||||
// Edit mode with full inline editing + photo upload/delete
|
||||
// ... (full edit JSX from previous attempt)
|
||||
) : (
|
||||
// View mode with status badges, photos, approve/reject buttons
|
||||
// ... (full view JSX from previous attempt)
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user