fix: Workshop mobile layout + navigation from all modes
Mobile: - Workshop nav tabs full-width, hide logo, hide hero header - Search/sort/share go full-width stacked - Tags scroll horizontally - Share button large and prominent - Patch cards single column, shorter previews - Auth modal fits mobile viewport Navigation: - Workshop button in Sandbox hamburger menu (mobile) - Workshop tab in WorldMap mobile tab bar - GameApp passes onWorkshop prop through to WorldMap Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ import { WORLD_12 } from './levels/world12.js';
|
||||
|
||||
const allWorlds = [WORLD_1, WORLD_2, WORLD_3, WORLD_4, WORLD_5, WORLD_6, WORLD_7, WORLD_8, WORLD_9, WORLD_10, WORLD_11, WORLD_12];
|
||||
|
||||
export default function GameApp({ onSwitchToSandbox }) {
|
||||
export default function GameApp({ onSwitchToSandbox, onSwitchToWorkshop }) {
|
||||
const [view, setView] = useState('map');
|
||||
const [currentLevel, setCurrentLevel] = useState(null);
|
||||
const [currentLevelIndex, setCurrentLevelIndex] = useState(0);
|
||||
@@ -78,6 +78,7 @@ export default function GameApp({ onSwitchToSandbox }) {
|
||||
<WorldMap
|
||||
onSelectLevel={handleSelectLevel}
|
||||
onSandbox={onSwitchToSandbox}
|
||||
onWorkshop={onSwitchToWorkshop}
|
||||
onAdmin={() => setShowAdmin(true)}
|
||||
/>
|
||||
{showAdmin && (
|
||||
|
||||
@@ -45,10 +45,11 @@ function isWorldUnlocked(world) {
|
||||
const MOBILE_TABS = [
|
||||
{ id: 'game', label: 'JUEGO', icon: '🎮' },
|
||||
{ id: 'sandbox', label: 'SANDBOX', icon: '🎛' },
|
||||
{ id: 'workshop', label: 'WORKSHOP', icon: '🎵' },
|
||||
{ id: 'config', label: 'CONFIG', icon: '⚙' },
|
||||
];
|
||||
|
||||
export default function WorldMap({ onSelectLevel, onSandbox, onAdmin }) {
|
||||
export default function WorldMap({ onSelectLevel, onSandbox, onAdmin, onWorkshop }) {
|
||||
const totalStars = getTotalStars();
|
||||
const maxStars = getMaxStars();
|
||||
const [search, setSearch] = useState('');
|
||||
@@ -236,6 +237,7 @@ export default function WorldMap({ onSelectLevel, onSandbox, onAdmin }) {
|
||||
activeTab="game"
|
||||
onTabChange={(id) => {
|
||||
if (id === 'sandbox') onSandbox?.();
|
||||
if (id === 'workshop') onWorkshop?.();
|
||||
if (id === 'config') onAdmin?.();
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user