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}
-
diff --git a/src/uhm/components/preview/PublicPreviewClientPage.tsx b/src/uhm/components/preview/PublicPreviewClientPage.tsx
index c9839bf..eae2380 100644
--- a/src/uhm/components/preview/PublicPreviewClientPage.tsx
+++ b/src/uhm/components/preview/PublicPreviewClientPage.tsx
@@ -825,6 +825,7 @@ export default function PublicPreviewClientPage({
onSelectFeatureIds={setSelectedFeatureIds}
instantLoad={instantLoad}
onToggleInstantLoad={toggleInstantLoad}
+ isReplayMode={replayMode !== "idle"}
isLayerPanelVisible={isLayerPanelVisible}
onLayerPanelVisibleChange={setIsLayerPanelVisible}
backgroundVisibility={backgroundVisibility}
@@ -888,30 +889,32 @@ export default function PublicPreviewClientPage({
) : null
}
>
-
-
- {isLargeScreen ? (
-
+
- ) : null}
-
+ {isLargeScreen ? (
+
+ ) : null}
+
+ ) : null}
)}
diff --git a/src/uhm/lib/replay/uiActions.ts b/src/uhm/lib/replay/uiActions.ts
index 868f788..61333c4 100644
--- a/src/uhm/lib/replay/uiActions.ts
+++ b/src/uhm/lib/replay/uiActions.ts
@@ -24,6 +24,12 @@ export const uiActions = {
setSidebarOpen(false);
onSelectWiki("");
} else {
+ // Hạn chế không tự động mở wiki trong chế độ Replay trên mobile/tablet để tránh đè giao diện
+ if (typeof window !== "undefined" && window.innerWidth < 1024) {
+ setSidebarOpen(false);
+ onSelectWiki("");
+ return;
+ }
setSidebarOpen(true);
onSelectWiki(wikiId);
}