diff --git a/app/api/email/respond/route.tsx b/app/api/email/respond/route.tsx index c19963d..c13e75a 100644 --- a/app/api/email/respond/route.tsx +++ b/app/api/email/respond/route.tsx @@ -319,8 +319,6 @@ const emailTemplates = { ` -<<<<<<< HEAD -======= }, reply: { subject: "Antwort auf deine Nachricht 📧", @@ -419,11 +417,7 @@ export async function POST(request: NextRequest) { const body = (await request.json()) as { to: string; name: string; -<<<<<<< HEAD - template: 'welcome' | 'project' | 'quick'; -======= template: 'welcome' | 'project' | 'quick' | 'reply'; ->>>>>>> dev originalMessage: string; }; diff --git a/app/editor/page.tsx b/app/editor/page.tsx index f0a39ed..b40869d 100644 --- a/app/editor/page.tsx +++ b/app/editor/page.tsx @@ -567,6 +567,7 @@ function EditorPageContent() { className="p-2 rounded-lg text-gray-300" title="Image" > + {/* eslint-disable-next-line jsx-a11y/alt-text */} diff --git a/components/AnalyticsDashboard.tsx b/components/AnalyticsDashboard.tsx index 17e2895..1aed281 100644 --- a/components/AnalyticsDashboard.tsx +++ b/components/AnalyticsDashboard.tsx @@ -66,7 +66,6 @@ interface AnalyticsDashboardProps { export function AnalyticsDashboard({ isAuthenticated }: AnalyticsDashboardProps) { const [data, setData] = useState(null); const [loading, setLoading] = useState(false); ->>>>>>> dev const [error, setError] = useState(null); const [timeRange, setTimeRange] = useState<'7d' | '30d' | '90d' | '1y'>('30d'); const [showResetModal, setShowResetModal] = useState(false); diff --git a/components/EmailManager.tsx b/components/EmailManager.tsx index 1837be9..98b6ce7 100644 --- a/components/EmailManager.tsx +++ b/components/EmailManager.tsx @@ -1,255 +1,6 @@ 'use client'; import React, { useState, useEffect } from 'react'; -<<<<<<< HEAD -import { EmailResponder } from './EmailResponder'; - -interface ContactMessage { - id: string; - name: string; - email: string; - subject: string; - message: string; - timestamp: string; - responded: boolean; -} - -export const EmailManager: React.FC = () => { - const [messages, setMessages] = useState([]); - const [selectedMessage, setSelectedMessage] = useState(null); - const [showResponder, setShowResponder] = useState(false); - const [isLoading, setIsLoading] = useState(true); - const [filter, setFilter] = useState<'all' | 'unread' | 'responded'>('all'); - - // Mock data for demonstration - in real app, fetch from API - useEffect(() => { - const mockMessages: ContactMessage[] = [ - { - id: '1', - name: 'Max Mustermann', - email: 'max@example.com', - subject: 'Projekt-Anfrage', - message: 'Hallo Dennis,\n\nich interessiere mich für eine Zusammenarbeit an einem Web-Projekt. Können wir uns mal unterhalten?\n\nViele Grüße\nMax', - timestamp: new Date().toISOString(), - responded: false - }, - { - id: '2', - name: 'Anna Schmidt', - email: 'anna@example.com', - subject: 'Frage zu deinem Portfolio', - message: 'Hi Dennis,\n\nsehr cooles Portfolio! Wie lange hast du an dem Design gearbeitet?\n\nLG Anna', - timestamp: new Date(Date.now() - 86400000).toISOString(), - responded: true - }, - { - id: '3', - name: 'Tom Weber', - email: 'tom@example.com', - subject: 'Job-Anfrage', - message: 'Hallo,\n\nwir suchen einen Full-Stack Developer. Bist du interessiert?\n\nTom', - timestamp: new Date(Date.now() - 172800000).toISOString(), - responded: false - } - ]; - - setTimeout(() => { - setMessages(mockMessages); - setIsLoading(false); - }, 1000); - }, []); - - const filteredMessages = messages.filter(message => { - switch (filter) { - case 'unread': - return !message.responded; - case 'responded': - return message.responded; - default: - return true; - } - }); - - const handleRespond = (message: ContactMessage) => { - setSelectedMessage(message); - setShowResponder(true); - }; - - const handleResponseSent = () => { - if (selectedMessage) { - setMessages(prev => prev.map(msg => - msg.id === selectedMessage.id - ? { ...msg, responded: true } - : msg - )); - } - setShowResponder(false); - setSelectedMessage(null); - }; - - const formatDate = (timestamp: string) => { - return new Date(timestamp).toLocaleString('de-DE', { - day: '2-digit', - month: '2-digit', - year: 'numeric', - hour: '2-digit', - minute: '2-digit' - }); - }; - - const getMessagePreview = (message: string) => { - return message.length > 100 ? message.substring(0, 100) + '...' : message; - }; - - if (isLoading) { - return ( -
-
-
- ); - } - - return ( -
- - {/* Header */} -
-
-
-

📧 E-Mail Manager

-

Verwalte Kontaktanfragen und sende schöne Antworten

-
-
-
- {filteredMessages.length} von {messages.length} Nachrichten -
-
-
-
- - {/* Filters */} -
-
- - - -
-
- - {/* Messages List */} -
- {filteredMessages.length === 0 ? ( -
-
📭
-

Keine Nachrichten

-

- {filter === 'unread' && 'Alle Nachrichten wurden beantwortet!'} - {filter === 'responded' && 'Noch keine Nachrichten beantwortet.'} - {filter === 'all' && 'Noch keine Kontaktanfragen eingegangen.'} -

-
- ) : ( - filteredMessages.map((message) => ( -
-
-
-
-
-

{message.name}

- {message.email} - {!message.responded && ( - - Neu - - )} -
- -

{message.subject}

- -

- {getMessagePreview(message.message)} -

- -
- 📅 {formatDate(message.timestamp)} - {message.responded && ( - ✅ Beantwortet - )} -
-
- -
- {!message.responded && ( - - )} - -
-
-
- )) - )} -
- - {/* Email Responder Modal */} - {showResponder && selectedMessage && ( - - )} -
- ); -}; -======= import { motion, AnimatePresence } from 'framer-motion'; import { Mail, @@ -610,5 +361,4 @@ export const EmailManager: React.FC = () => { ); -}; ->>>>>>> dev +}; \ No newline at end of file diff --git a/components/ModernAdminDashboard.tsx b/components/ModernAdminDashboard.tsx index 32e8451..a43a090 100644 --- a/components/ModernAdminDashboard.tsx +++ b/components/ModernAdminDashboard.tsx @@ -1,22 +1,5 @@ 'use client'; -<<<<<<< HEAD -import React, { useState, useEffect } from 'react'; -import { motion, AnimatePresence } from 'framer-motion'; -import { - Mail, - BarChart3, - Zap, - Globe, - Settings, - FileText, - TrendingUp, - ArrowLeft, - Plus, - Edit, - Trash2, - Eye -======= import React, { useState, useEffect, useCallback } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { @@ -32,48 +15,11 @@ import { LogOut, Menu, X ->>>>>>> dev } from 'lucide-react'; import Link from 'next/link'; import { EmailManager } from './EmailManager'; import { AnalyticsDashboard } from './AnalyticsDashboard'; import ImportExport from './ImportExport'; -<<<<<<< HEAD - -interface Project { - id: number; - title: string; - description: string; - content: string; - tags: string[]; - featured: boolean; - category: string; - date: string; - github?: string; - live?: string; - published: boolean; - imageUrl?: string; - metaDescription?: string; - keywords?: string; - ogImage?: string; - schema?: Record; - difficulty: 'Beginner' | 'Intermediate' | 'Advanced' | 'Expert'; - timeToComplete?: string; - technologies: string[]; - challenges: string[]; - lessonsLearned: string[]; - futureImprovements: string[]; - demoVideo?: string; - screenshots: string[]; - colorScheme: string; - accessibility: boolean; - performance: { - lighthouse: number; - bundleSize: string; - loadTime: string; - }; - analytics: { -======= import { ProjectManager } from './ProjectManager'; interface Project { @@ -92,197 +38,10 @@ interface Project { createdAt: string; updatedAt: string; analytics?: { ->>>>>>> dev views: number; likes: number; shares: number; }; -<<<<<<< HEAD -} - -const ModernAdminDashboard: React.FC = () => { - const [activeTab, setActiveTab] = useState<'overview' | 'projects' | 'emails' | 'analytics' | 'settings'>('overview'); - const [projects, setProjects] = useState([]); - const [isLoading, setIsLoading] = useState(true); - - // Mock stats for overview - const stats = { - totalProjects: projects.length, - publishedProjects: projects.filter(p => p.published).length, - totalViews: projects.reduce((sum, p) => sum + p.analytics.views, 0), - unreadEmails: 3, // This would come from your email API - avgPerformance: Math.round(projects.reduce((sum, p) => sum + p.performance.lighthouse, 0) / projects.length) || 90 - }; - - useEffect(() => { - loadProjects(); - }, []); - - const loadProjects = async () => { - try { - setIsLoading(true); - const response = await fetch('/api/projects'); - const data = await response.json(); - setProjects(data.projects || []); - } catch (error) { - console.error('Error loading projects:', error); - } finally { - setIsLoading(false); - } - }; - - const handleEdit = (project: Project) => { - // TODO: Implement edit functionality - console.log('Edit project:', project); - }; - - const handleDelete = async (projectId: number) => { - if (confirm('Are you sure you want to delete this project?')) { - try { - await fetch(`/api/projects/${projectId}`, { method: 'DELETE' }); - await loadProjects(); - } catch (error) { - console.error('Error deleting project:', error); - } - } - }; - - const resetForm = () => { - // TODO: Implement form reset functionality - console.log('Reset form'); - }; - - const tabs = [ - { id: 'overview', label: 'Overview', icon: BarChart3, color: 'blue' }, - { id: 'projects', label: 'Projects', icon: FileText, color: 'green' }, - { id: 'emails', label: 'Emails', icon: Mail, color: 'purple' }, - { id: 'analytics', label: 'Analytics', icon: TrendingUp, color: 'orange' }, - { id: 'settings', label: 'Settings', icon: Settings, color: 'gray' } - ]; - - - return ( -
- {/* Header */} -
-
-
-
- - - Back to Portfolio - -
-

Admin Dashboard

-
- -
-
-
- Live -
-
- dk0.dev -
-
-
-
-
- -
-
- - {/* Sidebar */} -
-
- -
-
- - {/* Main Content */} -
- - {activeTab === 'overview' && ( - - {/* Stats Grid */} -
-
-
-
-

Total Projects

-

{stats.totalProjects}

-
-
- -
-
-
- -
-
-
-

Published

-

{stats.publishedProjects}

-
-
- -
-
-
- -
-
-
-

Total Views

-

{stats.totalViews.toLocaleString()}

-
-
- -
-
-
- -
-
-
-

Avg Performance

-

{stats.avgPerformance}

-
-
- -======= performance?: { lighthouse: number; }; @@ -632,177 +391,11 @@ const ModernAdminDashboard: React.FC = ({ isAuthentic

All systems operational

->>>>>>> dev
-<<<<<<< HEAD - {/* Recent Projects */} -
-
-

Recent Projects

- -
- -
- {projects.slice(0, 3).map((project) => ( -
-
- - {project.title.charAt(0)} - -
-
-

{project.title}

-

{project.category}

-
-
- - {project.published ? 'Published' : 'Draft'} - - -
-
- ))} -
-
- - )} - - {activeTab === 'projects' && ( - -
-

Projects

- -
- - {isLoading ? ( -
-
-
- ) : ( -
- {projects.map((project) => ( -
-
-
- - {project.title.charAt(0)} - -
-
- - -
-
- -

{project.title}

-

{project.description}

- -
- - {project.category} - - - {project.published ? 'Published' : 'Draft'} - -
-
- ))} -
- )} -
- )} - - {activeTab === 'emails' && ( - - - - )} - - {activeTab === 'analytics' && ( - - - - )} - - {activeTab === 'settings' && ( - -

Settings

- -
-

Import/Export

- -
-
- )} - -
-======= {/* Recent Activity & Quick Actions - Mobile: vertical, Desktop: horizontal */}
{/* Recent Activity */} @@ -1003,15 +596,10 @@ const ModernAdminDashboard: React.FC = ({ isAuthentic )} ->>>>>>> dev
); }; -<<<<<<< HEAD -export default ModernAdminDashboard; -======= -export default ModernAdminDashboard; ->>>>>>> dev +export default ModernAdminDashboard; \ No newline at end of file