Add smooth animations across WebUI for modern feel

- Tab panels: fade-in with subtle translateY on switch
- Cards: hover lift (translateY -2px), staggered entrance animation
- Modals: spring-curve entrance with backdrop blur
- Buttons: press feedback (scale down on :active)
- Toggle switches: spring overshoot on knob transition
- Toast: smooth bounce-in replaces jarring shake
- Sections: animated height collapse/expand with chevron rotation
- Command palette: slide-down entrance animation
- Theme switch: smooth color transitions on key elements
- Dashboard: section collapse animation, target row hover
- Respects prefers-reduced-motion globally

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 00:03:47 +03:00
parent d33d70cfe8
commit 88abd31c1c
10 changed files with 193 additions and 37 deletions

View File

@@ -59,7 +59,7 @@
cursor: pointer;
font-size: 0.9rem;
font-weight: 600;
transition: opacity 0.2s;
transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
flex: 1 1 auto;
min-width: 100px;
}
@@ -68,6 +68,11 @@
opacity: 0.9;
}
.btn:active:not(:disabled) {
transform: scale(0.97);
transition-duration: 0.06s;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
@@ -100,6 +105,11 @@
opacity: 1;
}
.btn-icon:active:not(:disabled) {
transform: scale(0.92);
transition-duration: 0.06s;
}
.form-group {
margin-bottom: 15px;
}
@@ -129,7 +139,7 @@
inset: 0;
background: var(--border-color);
border-radius: 9px;
transition: background 0.2s;
transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-toggle-slider::after {
@@ -141,7 +151,7 @@
height: 14px;
background: white;
border-radius: 50%;
transition: transform 0.2s;
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.settings-toggle input:checked + .settings-toggle-slider {
@@ -172,7 +182,7 @@ select {
color: var(--text-color);
font-size: 1rem;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}
input[type="number"]:disabled,
@@ -196,7 +206,7 @@ input:focus,
select:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}
/* Remove browser autofill styling */
@@ -339,7 +349,7 @@ input:-webkit-autofill:focus {
font-weight: 600;
font-size: 15px;
opacity: 0;
transition: opacity 0.3s, transform 0.3s;
transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
z-index: 2500;
box-shadow: 0 4px 20px var(--shadow-color);
min-width: 300px;
@@ -349,13 +359,14 @@ input:-webkit-autofill:focus {
.toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
animation: toastShake 0.5s ease-in-out;
animation: toastBounceIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastShake {
0%, 100% { transform: translateX(-50%) translateY(0); }
10%, 30%, 50%, 70%, 90% { transform: translateX(-50%) translateY(-5px); }
20%, 40%, 60%, 80% { transform: translateX(-50%) translateY(5px); }
@keyframes toastBounceIn {
0% { transform: translateX(-50%) translateY(60px); opacity: 0; }
50% { transform: translateX(-50%) translateY(-4px); opacity: 1; }
70% { transform: translateX(-50%) translateY(2px); }
100% { transform: translateX(-50%) translateY(0); }
}
.toast.success {