feat: add better loading states and animations

- Added spinning loading indicators on all buttons
- Fade-in animations for newly revealed elements
- Loading states with visual feedback (opacity, cursor)
- Smooth CSS animations for spinners and fades
- Loading indicators on: API validation, save operations,
  regenerate buttons, and character operations
- Improved UX with clear visual feedback during async operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-14 12:11:11 -07:00
parent 4866c11245
commit b9ea771ff0
2 changed files with 83 additions and 4 deletions

View File

@@ -246,6 +246,19 @@ body {
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fade-in {
animation: fadeIn 0.3s ease;
}
.message.user {
justify-content: flex-end;
}
@@ -757,6 +770,47 @@ body {
}
}
/* Loading spinner */
.loading-spinner {
display: inline-block;
width: 14px;
height: 14px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: currentColor;
animation: spin 0.8s linear infinite;
margin-left: 8px;
vertical-align: middle;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Button loading state */
.btn-primary.loading,
.btn-secondary.loading,
.message-action-btn.loading {
opacity: 0.7;
cursor: wait;
position: relative;
}
.btn-primary.loading::after,
.btn-secondary.loading::after {
content: '';
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
width: 12px;
height: 12px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: white;
animation: spin 0.8s linear infinite;
}
/* Light mode support */
@media (prefers-color-scheme: light) {
:root {