refactor(ui): unify and modernize in-app toast notifications

- Created root-level ToastProvider and useToast hook
- Replaced scattered ad-hoc toast states with unified provider
- Updated Settings, Scheduler, Speed Limiter, App, and DownloadTable to use ToastContext
- Added variant support (success, info, warning, error) with distinct styling
- Refined toast animations and styling for modern aesthetics
- Adjusted auto-dismiss behavior to ignore actionable or important errors
This commit is contained in:
NimBold
2026-06-20 19:28:29 +03:30
parent 038f31b988
commit 2cc00e433e
8 changed files with 199 additions and 122 deletions
+4 -11
View File
@@ -875,15 +875,8 @@
filter: none;
}
.app-toast {
border: 1px solid hsl(var(--border-modal));
border-radius: 8px;
background: hsl(var(--surface-overlay));
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
color: hsl(var(--text-primary));
box-shadow: 0 4px 12px hsl(var(--shadow-color));
animation: toast-in 200ms ease-out;
.app-toast-item {
animation: toast-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.app-shell {
@@ -1792,8 +1785,8 @@
}
@keyframes toast-in {
from { opacity: 0; transform: translate(-50%, 8px); }
to { opacity: 1; transform: translate(-50%, 0); }
from { opacity: 0; transform: translateY(12px) scale(0.98); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {