fix(mobile): improve refresh button - float over all tabs, add animation, fix focus

**Changes:**
1. Move button to float over all tabs (not just Stats)
   - Removed from userStats.js HTML
   - Added to template.html as floating absolute element
   - Now visible on Status, Info, and Inventory tabs

2. Fix sticky black focus state
   - Added :focus { outline: none } to CSS
   - Call blur() after click to clear focus immediately

3. Add refresh animation
   - Button spins during updateRPGData() call
   - Smooth 0.8s rotation with @keyframes
   - Uses .spinning class added/removed in JS

4. Improve theming and positioning
   - Positioned absolute top-right (10px, 10px)
   - Increased to 44px for better touch target
   - z-index: 100 to float above content
   - Already uses theme colors (--rpg-highlight, --rpg-text)

Mobile UX now:
 Button visible on all tabs (floating)
 Spins smoothly when refreshing
 No sticky black state after tap
 Properly themed across all themes
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-21 21:27:20 +11:00
parent 577010e2aa
commit dd392e50d1
4 changed files with 48 additions and 13 deletions
+5
View File
@@ -54,6 +54,11 @@
</div>
</div>
<!-- Mobile Floating Refresh Button (shown on all tabs) -->
<button id="rpg-manual-update-mobile" class="rpg-refresh-icon-btn" title="Refresh RPG Info">
<i class="fa-solid fa-sync"></i>
</button>
<!-- HTML Prompt Toggle -->
<div class="rpg-toggle-container">
<label class="rpg-toggle-label">