Memperbaiki beberapa kesalahan

This commit is contained in:
2026-06-09 19:39:33 +07:00
parent b3b709dbec
commit ca807b7525
2 changed files with 36 additions and 23 deletions
+12 -4
View File
@@ -314,10 +314,18 @@
}
function showToast(msg, type = 'info') {
const el = document.getElementById('toast');
el.textContent = msg;
el.className = 'show' + (type ? ' ' + type : '');
setTimeout(() => { el.className = ''; }, 3000);
const container = document.getElementById('toast');
const toast = document.createElement('div');
toast.className = `toast-item toast-${type}`;
toast.textContent = msg;
container.appendChild(toast);
setTimeout(() => {
toast.style.opacity = '0';
toast.style.transform = 'translateX(30px)';
toast.style.transition = 'all 0.3s ease';
setTimeout(() => toast.remove(), 300);
}, 3000);
}
// ============================================================