feat(ui): add tab navigation system for desktop and mobile
Desktop (2 tabs): - Status tab: User Stats + Info Box + Character Thoughts - Inventory tab: Inventory system (dedicated space) Mobile (3 tabs): - Stats tab: User Stats only - Info tab: Info Box + Character Thoughts - Inventory tab: Inventory only Features: - Created desktop.js module for desktop tab management - Updated mobile.js to use 3-tab structure (more breathing room on small screens) - Added CSS styling for desktop tabs (hover states, active indicators) - Implemented viewport transition handlers (desktop ↔ mobile) - Tabs replace dividers (cleaner visual separation) - Character thoughts can now expand to fill vertical space This resolves the cramped 4-section panel issue by organizing content into logical tabs on both desktop and mobile.
This commit is contained in:
@@ -100,6 +100,10 @@ import {
|
||||
setupMobileKeyboardHandling,
|
||||
setupContentEditableScrolling
|
||||
} from './src/systems/ui/mobile.js';
|
||||
import {
|
||||
setupDesktopTabs,
|
||||
removeDesktopTabs
|
||||
} from './src/systems/ui/desktop.js';
|
||||
|
||||
// Feature modules
|
||||
import { setupPlotButtons, sendPlotProgression } from './src/systems/features/plotProgression.js';
|
||||
@@ -368,6 +372,11 @@ async function initUI() {
|
||||
// Setup mobile toggle button
|
||||
setupMobileToggle();
|
||||
|
||||
// Setup desktop tabs (only on desktop viewport)
|
||||
if (window.innerWidth > 1000) {
|
||||
setupDesktopTabs();
|
||||
}
|
||||
|
||||
// Setup collapse/expand toggle button
|
||||
setupCollapseToggle();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user