diff --git a/admin-spa/src/App.tsx b/admin-spa/src/App.tsx index 2d03bec..d2855da 100644 --- a/admin-spa/src/App.tsx +++ b/admin-spa/src/App.tsx @@ -452,7 +452,6 @@ function Shell() { const isDesktop = useIsDesktop(); const location = useLocation(); const scrollContainerRef = React.useRef(null); - const [isHeaderVisible, setIsHeaderVisible] = React.useState(true); // Check if standalone mode - force fullscreen and hide toggle const isStandalone = window.WNW_CONFIG?.standaloneMode ?? false; @@ -469,7 +468,7 @@ function Shell() { {!isStandalone && } {!isStandalone && }
-
+
{fullscreen ? ( isDesktop ? (
@@ -490,9 +489,9 @@ function Shell() {
{!isMorePage && (isDashboardRoute ? ( - + ) : ( - + ))}
diff --git a/admin-spa/src/components/nav/DashboardSubmenuBar.tsx b/admin-spa/src/components/nav/DashboardSubmenuBar.tsx index a8c090e..13f2cdd 100644 --- a/admin-spa/src/components/nav/DashboardSubmenuBar.tsx +++ b/admin-spa/src/components/nav/DashboardSubmenuBar.tsx @@ -22,11 +22,10 @@ export default function DashboardSubmenuBar({ items = [], fullscreen = false, he if (items.length === 0) return null; - // Calculate top position based on fullscreen state and header visibility - // Fullscreen with header visible: top-16 (below 64px header) - // Fullscreen with header hidden: top-0 (replace header position) + // Calculate top position based on fullscreen state + // Fullscreen: top-0 (no contextual headers, submenu is first element) // Normal: top-[calc(7rem+32px)] (below WP admin bar + menu bar) - const topClass = fullscreen ? (headerVisible ? 'top-16' : 'top-0') : 'top-[calc(7rem+32px)]'; + const topClass = fullscreen ? 'top-0' : 'top-[calc(7rem+32px)]'; return (
diff --git a/admin-spa/src/components/nav/SubmenuBar.tsx b/admin-spa/src/components/nav/SubmenuBar.tsx index a08a03e..b294c1d 100644 --- a/admin-spa/src/components/nav/SubmenuBar.tsx +++ b/admin-spa/src/components/nav/SubmenuBar.tsx @@ -11,11 +11,10 @@ export default function SubmenuBar({ items = [], fullscreen = false, headerVisib // Single source of truth: props.items. No fallbacks, no demos, no path-based defaults if (items.length === 0) return null; - // Calculate top position based on fullscreen state and header visibility - // Fullscreen with header visible: top-16 (below 64px header) - // Fullscreen with header hidden: top-0 (replace header position) + // Calculate top position based on fullscreen state + // Fullscreen: top-0 (no contextual headers, submenu is first element) // Normal: top-[calc(7rem+32px)] (below WP admin bar + menu bar) - const topClass = fullscreen ? (headerVisible ? 'top-16' : 'top-0') : 'top-[calc(7rem+32px)]'; + const topClass = fullscreen ? 'top-0' : 'top-[calc(7rem+32px)]'; return (
diff --git a/admin-spa/src/routes/More/index.tsx b/admin-spa/src/routes/More/index.tsx index 410e6cb..f071dde 100644 --- a/admin-spa/src/routes/More/index.tsx +++ b/admin-spa/src/routes/More/index.tsx @@ -38,6 +38,12 @@ export default function MorePage() { return () => clearPageHeader(); }, [setPageHeader, clearPageHeader]); + const handleExitFullscreen = () => { + exitFullscreen?.(); + // Redirect to dashboard after exiting fullscreen + navigate('/'); + }; + const handleLogout = () => { // Clear auth and redirect to login window.location.href = window.WNW_CONFIG?.wpAdminUrl || '/wp-admin'; @@ -87,7 +93,7 @@ export default function MorePage() { ) : (