feat(mobile): Add FAB widgets with info display around toggle button

- Add 8-position widget system around mobile FAB button (N, NE, E, SE, S, SW, W, NW)
- Display weather icon, weather description, time, date, location around FAB
- Show stats and RPG attributes in larger West/Northwest positions
- Add animated clock face matching main panel design
- Implement expandable text on hover/tap for truncated content
- Add FAB spinner animation during API requests
- Respect tracker preset settings for filtering displayed stats/attributes
- Sync FAB data with lastGeneratedData for real-time updates
- Hide FAB widgets on desktop viewport (>1000px) and when panel is open
- Add settings UI for enabling/disabling individual widget types
- Update FAB widgets on manual edits in tracker editor and stats panels
This commit is contained in:
tomt610
2026-01-10 13:18:34 +00:00
parent f5641ec1f0
commit 73cbb27713
11 changed files with 936 additions and 5 deletions
+4
View File
@@ -34,6 +34,7 @@ import { renderQuests } from '../rendering/quests.js';
import { renderMusicPlayer } from '../rendering/musicPlayer.js';
import { i18n } from '../../core/i18n.js';
import { generateAvatarsForCharacters } from '../features/avatarGenerator.js';
import { setFabLoadingState, updateFabWidgets } from '../ui/mobile.js';
// Store the original preset name to restore after tracker generation
let originalPresetName = null;
@@ -235,6 +236,7 @@ export async function updateRPGData(renderUserStats, renderInfoBox, renderThough
try {
setIsGenerating(true);
setFabLoadingState(true); // Show spinning FAB on mobile
// Update button to show "Updating..." state
const $updateBtn = $('#rpg-manual-update');
@@ -391,6 +393,8 @@ export async function updateRPGData(renderUserStats, renderInfoBox, renderThough
}
} finally {
setIsGenerating(false);
setFabLoadingState(false); // Stop spinning FAB on mobile
updateFabWidgets(); // Update FAB widgets with new data
// Restore button to original state
const $updateBtn = $('#rpg-manual-update');