feat: add responsive layout and dynamic height adjustments for ReplayPreviewOverlay on small screens
This commit is contained in:
@@ -123,7 +123,9 @@ export default function ReplayPreviewOverlay({
|
|||||||
|
|
||||||
{dialog && (dialog.text?.trim() || dialog.image_url?.trim()) ? (
|
{dialog && (dialog.text?.trim() || dialog.image_url?.trim()) ? (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={
|
||||||
|
isLargeScreen
|
||||||
|
? {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: 88,
|
left: 88,
|
||||||
right: rightOffset,
|
right: rightOffset,
|
||||||
@@ -131,7 +133,24 @@ export default function ReplayPreviewOverlay({
|
|||||||
pointerEvents: "none",
|
pointerEvents: "none",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "flex-start",
|
justifyContent: "flex-start",
|
||||||
}}
|
}
|
||||||
|
: {
|
||||||
|
position: "absolute",
|
||||||
|
left: 18,
|
||||||
|
right: 18,
|
||||||
|
pointerEvents: "none",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
...(sidebarOpen
|
||||||
|
? {
|
||||||
|
top: 130,
|
||||||
|
bottom: "auto",
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
bottom: 110,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -145,7 +164,7 @@ export default function ReplayPreviewOverlay({
|
|||||||
pointerEvents: "auto",
|
pointerEvents: "auto",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
maxHeight: "calc(100vh - 180px)",
|
maxHeight: isLargeScreen ? "calc(100vh - 180px)" : "220px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dialog.image_url?.trim() ? (
|
{dialog.image_url?.trim() ? (
|
||||||
@@ -155,7 +174,7 @@ export default function ReplayPreviewOverlay({
|
|||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
display: "block",
|
display: "block",
|
||||||
maxHeight: 140,
|
maxHeight: isLargeScreen ? 140 : 100,
|
||||||
objectFit: "cover",
|
objectFit: "cover",
|
||||||
background: "#020617",
|
background: "#020617",
|
||||||
}}
|
}}
|
||||||
@@ -170,7 +189,9 @@ export default function ReplayPreviewOverlay({
|
|||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
lineHeight: "1.6",
|
lineHeight: "1.6",
|
||||||
overflowY: "auto",
|
overflowY: "auto",
|
||||||
maxHeight: dialog.image_url?.trim() ? "180px" : "140px",
|
maxHeight: dialog.image_url?.trim()
|
||||||
|
? (isLargeScreen ? "180px" : "100px")
|
||||||
|
: (isLargeScreen ? "140px" : "120px"),
|
||||||
minHeight: 0,
|
minHeight: 0,
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user