diff --git a/src/wwwroot/js/site.js b/src/wwwroot/js/site.js index c1bd0c8..a30dea4 100644 --- a/src/wwwroot/js/site.js +++ b/src/wwwroot/js/site.js @@ -12,14 +12,19 @@ function showToast(message, type) { const toast = document.createElement('div'); toast.className = `toast align-items-center text-white bg-${type} border-0`; toast.role = 'alert'; + var useDarkElements = type === "warning" toast.innerHTML = `
${message}
- +
`; + if (useDarkElements) { + toast.classList.remove("text-white"); + toast.classList.add("text-dark"); + } toastContainer.appendChild(toast); - const bsToast = new bootstrap.Toast(toast, { delay: 3000 }); + const bsToast = new bootstrap.Toast(toast, { delay: 5000 }); bsToast.show(); toast.addEventListener('hidden.bs.toast', () => toast.remove()); }