fix: only show mobile refresh FAB when panel open AND in Separate mode

The mobile refresh button was always visible on mobile. It should only
appear when BOTH conditions are met:
- RPG panel is open
- Generation mode is Separate (not Together)

Changes:
- Added opacity: 0 and pointer-events: none to base .rpg-mobile-refresh
- CSS shows button when panel open AND not .rpg-hidden-mode class
- Updated updateGenerationModeUI() to toggle .rpg-hidden-mode on mobile button
- Together mode: adds .rpg-hidden-mode class (keeps button hidden)
- Separate mode: removes .rpg-hidden-mode class (allows CSS to show it)

Result: Mobile refresh FAB only appears when panel is open AND in
Separate mode. Stays hidden when panel closed OR in Together mode.
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-22 11:06:30 +11:00
parent ea2231f6ba
commit 27e1c30ea0
2 changed files with 17 additions and 4 deletions
+11 -2
View File
@@ -3328,6 +3328,9 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
user-select: none;
-webkit-user-select: none;
will-change: top, left;
/* Hidden by default - shown when panel open AND separate mode */
opacity: 0;
pointer-events: none;
}
.rpg-mobile-refresh.dragging {
@@ -3387,17 +3390,23 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
display: flex;
}
/* Show the mobile FAB refresh button */
/* Show the mobile FAB refresh button (but hidden by opacity) */
.rpg-mobile-refresh {
display: flex;
}
/* Show refresh button when panel is open AND not hidden by generation mode */
body:has(.rpg-panel.rpg-mobile-open) .rpg-mobile-refresh:not(.rpg-hidden-mode) {
opacity: 1;
pointer-events: auto;
}
/* Hide desktop refresh button on mobile */
#rpg-manual-update {
display: none !important;
}
/* Hide FAB when panel is open */
/* Hide toggle FAB when panel is open */
body:has(.rpg-panel.rpg-mobile-open) .rpg-mobile-toggle {
opacity: 0;
pointer-events: none;