fix: restore proper spinning animation for mobile refresh FAB

Reverted HTML replacement approach and restored the cleaner CSS-based
animation from commit 1855085.

Previous (wrong) approach:
- Replaced button HTML with spinner
- Modified both desktop and mobile buttons in apiClient.js
- Messy and inconsistent

Restored (correct) approach:
- Add/remove .spinning CSS class in click handler
- CSS animates only the icon inside the button
- Button itself stays unchanged
- Much cleaner implementation

Changes:
- Reverted apiClient.js changes from commit 9a49433
- Added .spinning CSS class and @keyframes rpg-spin
- Updated index.js click handler to bind both buttons
- Uses addClass/removeClass for clean animation control
- Includes drag detection to prevent accidental clicks

Now the mobile FAB icon spins smoothly when refreshing!
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-22 10:47:09 +11:00
parent 9a49433a28
commit ea2231f6ba
3 changed files with 44 additions and 13 deletions
+18
View File
@@ -3344,6 +3344,24 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
transform: scale(0.95);
}
/* Spinning animation when refreshing */
.rpg-mobile-refresh.spinning i {
animation: rpg-spin 0.8s linear infinite;
}
.rpg-mobile-refresh i {
pointer-events: none;
}
@keyframes rpg-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* Mobile overlay backdrop */
.rpg-mobile-overlay {
display: none;