From 4f9f2cd8542da5c717731caefc93497b4617b0a9 Mon Sep 17 00:00:00 2001 From: taDuc Date: Tue, 16 Jun 2026 00:58:36 +0700 Subject: [PATCH] feat: hide interface elements on mobile during replay mode and adjust overlay positioning --- .../editor/ReplayPreviewOverlay.tsx | 17 ++--- .../components/preview/PreviewMapShell.tsx | 72 ++++++++++--------- .../preview/PublicPreviewClientPage.tsx | 49 +++++++------ src/uhm/lib/replay/uiActions.ts | 6 ++ 4 files changed, 76 insertions(+), 68 deletions(-) diff --git a/src/uhm/components/editor/ReplayPreviewOverlay.tsx b/src/uhm/components/editor/ReplayPreviewOverlay.tsx index 87230f6..bf6ce5f 100644 --- a/src/uhm/components/editor/ReplayPreviewOverlay.tsx +++ b/src/uhm/components/editor/ReplayPreviewOverlay.tsx @@ -136,19 +136,12 @@ export default function ReplayPreviewOverlay({ } : { position: "absolute", - left: 18, - right: 18, + left: 16, + right: 16, + bottom: 20, pointerEvents: "none", display: "flex", justifyContent: "center", - ...(sidebarOpen - ? { - top: 130, - bottom: "auto", - } - : { - bottom: 110, - }), } } > @@ -226,10 +219,10 @@ export default function ReplayPreviewOverlay({
void; showViewportControls?: boolean; hasAnyBottomPanel?: boolean; + isReplayMode?: boolean; }; export default function PreviewMapShell({ @@ -113,6 +114,7 @@ export default function PreviewMapShell({ onSidebarHeightChange, showViewportControls = true, hasAnyBottomPanel = false, + isReplayMode = false, }: Props) { const [isMenuOpen, setIsMenuOpen] = useState(false); const [avatarUrl, setAvatarUrl] = useState(null); @@ -187,19 +189,21 @@ export default function PreviewMapShell({ height="100svh" /> - + {!(isReplayMode && isMobileOrTablet) ? ( + + ) : null}