fix: missing divider handling

This commit is contained in:
Subarashimo
2025-12-03 09:24:00 +01:00
parent c1a343eb46
commit d775b45951
+5 -2
View File
@@ -126,20 +126,22 @@ export function removeDesktopTabs() {
// Remove tabs container // Remove tabs container
$('.rpg-tabs-container').remove(); $('.rpg-tabs-container').remove();
// Get dividers // Get dividers (all 4 dividers in the template)
const $dividerStats = $('#rpg-divider-stats'); const $dividerStats = $('#rpg-divider-stats');
const $dividerInfo = $('#rpg-divider-info'); const $dividerInfo = $('#rpg-divider-info');
const $dividerThoughts = $('#rpg-divider-thoughts'); const $dividerThoughts = $('#rpg-divider-thoughts');
const $dividerInventory = $('#rpg-divider-inventory');
// Restore original sections to content box in correct order // Restore original sections to content box in correct order
const $contentBox = $('.rpg-content-box'); const $contentBox = $('.rpg-content-box');
// Re-insert sections in original order: User Stats, Info Box, Thoughts, Inventory, Quests // Re-insert sections in original order: User Stats, Info Box, Thoughts, Inventory, Quests
// Each section goes before its corresponding divider
if ($dividerStats.length) { if ($dividerStats.length) {
$dividerStats.before($userStats); $dividerStats.before($userStats);
$dividerInfo.before($infoBox); $dividerInfo.before($infoBox);
$dividerThoughts.before($thoughts); $dividerThoughts.before($thoughts);
$contentBox.append($inventory); $dividerInventory.before($inventory);
$contentBox.append($quests); $contentBox.append($quests);
} else { } else {
// Fallback if dividers don't exist // Fallback if dividers don't exist
@@ -155,6 +157,7 @@ export function removeDesktopTabs() {
$infoBox.show(); $infoBox.show();
$thoughts.show(); $thoughts.show();
$inventory.show(); $inventory.show();
$quests.show();
$('.rpg-divider').show(); $('.rpg-divider').show();
console.log('[RPG Desktop] Desktop tabs removed'); console.log('[RPG Desktop] Desktop tabs removed');