refactor: toast notification style

This commit is contained in:
MasterAcnolo
2026-09-13 15:53:21 +02:00
parent 58b6637eeb
commit 2c0f5b315b
3 changed files with 84 additions and 55 deletions

View File

@@ -17,18 +17,20 @@ window.showToast = function (message, type = "info", duration = 4000) {
toast.classList.add("toast", type);
const icons = {
success: "✓",
error: "✕",
warning: "⚠",
info: "ℹ"
success: "check_circle",
error: "error",
warning: "warning",
info: "info"
};
const icon = icons[type] || icons.info;
toast.style.setProperty("--toast-duration", `${duration}ms`);
toast.innerHTML = `
<span class="toast-icon">${icon}</span>
<span class="toast-icon material-icons-round">${icon}</span>
<span class="toast-message">${message}</span>
<button class="toast-close" title="Close">×</button>
<div class="toast-progress"></div>
`;
const closeBtn = toast.querySelector(".toast-close");