refactor: Modularize JavaScript Code into Separate Files
All checks were successful
Build and Push Docker Image / docker (push) Successful in 9s

This commit is contained in:
2025-09-05 14:41:55 +02:00
parent 24c8c41f1e
commit 35b88c0b29
5 changed files with 449 additions and 452 deletions

15
public/js/utils.js Normal file
View File

@@ -0,0 +1,15 @@
// Shared small utilities
export function showToast(msg) {
const el = document.getElementById('toast');
if (!el) return;
el.textContent = msg;
el.style.opacity = '1';
setTimeout(() => {
el.style.opacity = '0';
}, 1200);
}
export function wire(el, type, handler, options) {
if (el) el.addEventListener(type, handler, options);
}