// Hilfsfunktionen function escapeHtml(text) { if (!text) return ''; const div = document.createElement('div'); div.textContent = text; return div.innerHTML; } function formatDate(date) { if (!date) return ''; const d = new Date(date); return d.toLocaleDateString('de-DE'); } function showNotification(title, body) { // Electron Notification if (window.electronAPI) { // Notification wird im Hauptprozess ausgelöst } } function debounce(func, wait) { let timeout; return function executedFunction(...args) { const later = () => { clearTimeout(timeout); func(...args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; }