🎉 Fix for JOBS_UNDEFINED and LOG_EXPORT issues, updated documentation 📚 in backend/docs.

This commit is contained in:
2025-06-01 04:04:34 +02:00
parent 45d8d46556
commit 5ee854cbc6
43 changed files with 3053 additions and 118 deletions

View File

@ -115,11 +115,16 @@
if (messageType === 'danger') messageType = 'error';
// Nachricht über das moderne Glassmorphism-System anzeigen
if (typeof showFlashMessage === 'function') {
// Kleine Verzögerung für bessere UX
if (typeof showToast === 'function') {
// Kleine Verzögerung für bessere UX und schöne Glassmorphism-Animationen
setTimeout(() => {
showFlashMessage(message, messageType, 6000);
}, i * 200); // Nachrichten gestaffelt anzeigen
showToast(message, messageType, 6000, {
title: messageType === 'success' ? 'Erfolgreich' :
messageType === 'error' ? 'Fehler' :
messageType === 'warning' ? 'Warnung' : 'Information',
playSound: true
});
}, i * 250); // Nachrichten gestaffelt anzeigen
}
}
}
@ -769,39 +774,82 @@
<script src="{{ url_for('static', filename='js/auto-logout.js') }}"></script>
{% endif %}
<!-- Glassmorphism Notification System - Modernisiert -->
<script src="{{ url_for('static', filename='js/glassmorphism-notifications.js') }}"></script>
<!-- Additional JavaScript Functions -->
<script>
/**
* Logout-Handler für sicheres Abmelden
*/
function handleLogout() {
// Bestätigung abfragen
if (confirm('Möchten Sie sich wirklich abmelden?')) {
// Loading-Animation anzeigen
document.body.style.opacity = '0.7';
document.body.style.pointerEvents = 'none';
// CSRF-Token aus Meta-Tag holen
const csrfToken = document.querySelector('meta[name="csrf-token"]');
// Logout-Formular erstellen und absenden
const form = document.createElement('form');
form.method = 'POST';
form.action = '{{ url_for("auth_logout") }}';
form.style.display = 'none';
// CSRF-Token hinzufügen falls verfügbar
if (csrfToken) {
const input = document.createElement('input');
input.type = 'hidden';
input.name = 'csrf_token';
input.value = csrfToken.getAttribute('content');
form.appendChild(input);
// Verwende das moderne Glassmorphism-Bestätigungssystem
if (typeof showConfirmationToast === 'function') {
showConfirmationToast(
'Möchten Sie sich wirklich abmelden?',
() => {
// Loading-Animation anzeigen
document.body.style.opacity = '0.7';
document.body.style.pointerEvents = 'none';
// CSRF-Token aus Meta-Tag holen
const csrfToken = document.querySelector('meta[name="csrf-token"]');
// Logout-Formular erstellen und absenden
const form = document.createElement('form');
form.method = 'POST';
form.action = '{{ url_for("auth_logout") }}';
form.style.display = 'none';
// CSRF-Token hinzufügen falls verfügbar
if (csrfToken) {
const input = document.createElement('input');
input.type = 'hidden';
input.name = 'csrf_token';
input.value = csrfToken.getAttribute('content');
form.appendChild(input);
}
// Formular absenden
document.body.appendChild(form);
form.submit();
},
null,
{
title: 'Abmeldung bestätigen',
confirmText: 'Abmelden',
cancelText: 'Abbrechen'
}
);
} else {
// Fallback für den Fall, dass das Glassmorphism-System nicht verfügbar ist
if (confirm('Möchten Sie sich wirklich abmelden?')) {
// Loading-Animation anzeigen
document.body.style.opacity = '0.7';
document.body.style.pointerEvents = 'none';
// CSRF-Token aus Meta-Tag holen
const csrfToken = document.querySelector('meta[name="csrf-token"]');
// Logout-Formular erstellen und absenden
const form = document.createElement('form');
form.method = 'POST';
form.action = '{{ url_for("auth_logout") }}';
form.style.display = 'none';
// CSRF-Token hinzufügen falls verfügbar
if (csrfToken) {
const input = document.createElement('input');
input.type = 'hidden';
input.name = 'csrf_token';
input.value = csrfToken.getAttribute('content');
form.appendChild(input);
}
// Formular absenden
document.body.appendChild(form);
form.submit();
}
// Formular absenden
document.body.appendChild(form);
form.submit();
}
}
@ -832,11 +880,16 @@
if (messageType === 'danger') messageType = 'error';
// Nachricht über das moderne Glassmorphism-System anzeigen
if (typeof showFlashMessage === 'function') {
// Kleine Verzögerung für bessere UX
if (typeof showToast === 'function') {
// Kleine Verzögerung für bessere UX und schöne Glassmorphism-Animationen
setTimeout(() => {
showFlashMessage(message, messageType, 6000);
}, i * 200); // Nachrichten gestaffelt anzeigen
showToast(message, messageType, 6000, {
title: messageType === 'success' ? 'Erfolgreich' :
messageType === 'error' ? 'Fehler' :
messageType === 'warning' ? 'Warnung' : 'Information',
playSound: true
});
}, i * 250); // Nachrichten gestaffelt anzeigen
}
}
}
@ -1029,8 +1082,11 @@
? 'Nicht stören aktiviert - Benachrichtigungen werden unterdrückt'
: 'Nicht stören deaktiviert - Benachrichtigungen sind wieder aktiv';
if (typeof showFlashMessage === 'function') {
showFlashMessage(message, 'info', 3000);
if (typeof showToast === 'function') {
showToast(message, 'info', 3000, {
title: 'Information',
playSound: true
});
}
console.log(`🔕 DND ${this.isEnabled ? 'aktiviert' : 'deaktiviert'}`);
@ -1078,15 +1134,23 @@
const count = this.suppressedMessages.length;
const summaryMessage = `${count} Benachrichtigung${count > 1 ? 'en' : ''} während "Nicht stören" erhalten`;
if (typeof showFlashMessage === 'function') {
showFlashMessage(summaryMessage, 'info', 4000);
if (typeof showToast === 'function') {
showToast(summaryMessage, 'info', 4000, {
title: 'Information',
playSound: true
});
}
// Optional: Alle einzelnen Nachrichten anzeigen (mit Verzögerung)
this.suppressedMessages.forEach((item, index) => {
setTimeout(() => {
if (typeof showFlashMessage === 'function') {
showFlashMessage(item.message, item.type, 3000);
if (typeof showToast === 'function') {
showToast(item.message, item.type, 3000, {
title: item.type === 'success' ? 'Erfolgreich' :
item.type === 'error' ? 'Fehler' :
item.type === 'warning' ? 'Warnung' : 'Information',
playSound: true
});
}
}, (index + 1) * 500);
});
@ -1107,15 +1171,15 @@
}
integrateWithNotificationSystem() {
// Überschreibe showFlashMessage wenn verfügbar
if (typeof window.showFlashMessage === 'function') {
const originalShowFlashMessage = window.showFlashMessage;
window.showFlashMessage = (message, type, duration) => {
// Überschreibe showToast wenn verfügbar
if (typeof window.showToast === 'function') {
const originalShowToast = window.showToast;
window.showToast = (message, type, duration, options) => {
if (this.shouldSuppressNotification(message, type)) {
console.log(`🔕 Benachrichtigung unterdrückt: ${message}`);
return;
}
return originalShowFlashMessage(message, type, duration);
return originalShowToast(message, type, duration, options);
};
}
}