notification: remove dead code (notification class always present)

This commit is contained in:
Edouard Vanbelle
2026-04-25 00:59:58 +02:00
parent e148a92f5d
commit 7b56b518d8
-22
View File
@@ -7,7 +7,6 @@ import { notifications } from '../core/notifications.js';
const uiNotifications = {
show(title, message) {
if (notifications && typeof notifications.addNotification === 'function') {
const normalizedTitle = String(title || '').toLowerCase();
let icon = 'fa-info-circle';
let iconClass = 'upload';
@@ -37,27 +36,6 @@ const uiNotifications = {
});
return;
}
let notification = document.querySelector('.notification');
if (!notification) {
notification = document.createElement('div');
notification.classList.add('notification', 'hidden');
notification.innerHTML = `
<div class="notification-title">${title}</div>
<div class="notification-message">${message}</div>
`;
document.body.appendChild(notification);
} else {
notification.querySelector('.notification-title').textContent = title;
notification.querySelector('.notification-message').textContent = message;
}
notification.classList.remove('hidden');
setTimeout(() => {
notification.classList.add('hidden');
}, 5000);
}
};
export { uiNotifications };