This commit is contained in:
Lizandro Guarnizo
2026-01-26 23:12:18 -05:00
parent 87d253053c
commit 437a99dbcf
2 changed files with 144 additions and 16 deletions
+5 -1
View File
@@ -1078,6 +1078,8 @@ try {
actions.appendChild(btn);
toast.appendChild(actions);
this.toastsContainer.appendChild(toast);
// auto-eliminar toast de sesión expirada después de 1s
setTimeout(() => { if (toast.parentNode) toast.remove(); }, 1000);
},
showToast(notification) {
const toast = document.createElement('div');
@@ -1164,6 +1166,8 @@ try {
}
n.close();
};
// cerrar la notificación nativa automáticamente después de 1s
setTimeout(() => { try { n.close(); } catch(e) {} }, 1000);
} catch (e) { console.warn('native notification failed', e); }
}
@@ -1182,7 +1186,7 @@ try {
setTimeout(() => { o.stop(); ctx.close(); }, 180);
} catch (e) { console.warn('Notification sound failed', e); }
setTimeout(() => { if (toast.parentNode) toast.remove(); }, 18000);
setTimeout(() => { if (toast.parentNode) toast.remove(); }, 1000);
}
};