update toaster template class and fix toast timeout

This commit is contained in:
Linty
2025-08-26 14:30:24 +02:00
parent c616f17145
commit 93cc0e72a8
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -20,11 +20,11 @@ function pwgToaster(info) {
template.find('.toast_icon').addClass(info.icon === 'success' ? 'icon-ok' : 'icon-cancel');
template.addClass(info.icon === 'success' ? info.icon : 'error');
template.removeClass('template');
template.removeClass('template-pwg-toaster');
template.appendTo('#pwg_toaster');
const time = info.time ?? 3600;
setInterval(() => {
setTimeout(() => {
template.fadeOut(() => {
template.remove();
})