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
+6 -2
View File
@@ -266,11 +266,15 @@ export function applyPanelPosition() {
* Updates the UI based on generation mode selection.
*/
export function updateGenerationModeUI() {
const $mobileBtn = $('#rpg-manual-update-mobile');
if (extensionSettings.generationMode === 'together') {
// In "together" mode, manual update button is hidden
// In "together" mode, hide both desktop and mobile refresh buttons
$('#rpg-manual-update').hide();
$mobileBtn.addClass('rpg-hidden-mode');
} else {
// In "separate" mode, manual update button is visible
// In "separate" mode, show both desktop and mobile refresh buttons
$('#rpg-manual-update').show();
$mobileBtn.removeClass('rpg-hidden-mode');
}
}