up
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user