cursor done.

This commit is contained in:
2025-11-11 14:36:09 +08:00
parent 7a5fb889c5
commit 9b1eb6cafd
27 changed files with 4748 additions and 552 deletions

22
public/js/toast.js Normal file
View File

@@ -0,0 +1,22 @@
const toastEl = document.getElementById('statusMessage');
export function showToast(message, type = 'info', duration = null) {
if (!toastEl) return;
toastEl.textContent = message;
toastEl.className = `status-message-toast ${type}`;
requestAnimationFrame(() => {
toastEl.classList.add('show');
});
const timeout = duration !== null ? duration : type === 'info' ? 4000 : 3000;
setTimeout(() => {
toastEl.classList.remove('show');
setTimeout(() => {
toastEl.textContent = '';
toastEl.className = 'status-message-toast';
}, 300);
}, timeout);
}