feat: fix sight edit
This commit is contained in:
@ -182,7 +182,7 @@ export const RightWidgetTab = observer(
|
||||
|
||||
// 4. Update the store with the new order:
|
||||
// This will typically trigger a re-render of the component with the updated list.
|
||||
updateRightArticles(newRightArticles, language);
|
||||
updateRightArticles(newRightArticles);
|
||||
};
|
||||
|
||||
return (
|
||||
@ -347,7 +347,7 @@ export const RightWidgetTab = observer(
|
||||
value={
|
||||
sight[language].right[activeArticleIndex].body
|
||||
}
|
||||
onChange={(value) =>
|
||||
onChange={(value: any) =>
|
||||
updateRightArticleInfo(
|
||||
activeArticleIndex,
|
||||
language,
|
||||
@ -381,11 +381,11 @@ export const RightWidgetTab = observer(
|
||||
</Box>
|
||||
)}
|
||||
{type === "media" && (
|
||||
<Box className="w-[80%] border border-gray-300 rounded-2xl relative">
|
||||
<Box className="w-[80%] border border-gray-300 rounded-2xl relative flex justify-center items-center">
|
||||
{sight.common.preview_media && (
|
||||
<>
|
||||
{type === "media" && (
|
||||
<Box className="w-[80%] h-full rounded-2xl relative flex items-center justify-center">
|
||||
<Box className="w-full h-full rounded-2xl relative flex items-center justify-center">
|
||||
{previewMedia && (
|
||||
<>
|
||||
<Box className="absolute top-4 right-4 z-10">
|
||||
@ -397,7 +397,7 @@ export const RightWidgetTab = observer(
|
||||
</button>
|
||||
</Box>
|
||||
|
||||
<Box className="w-1/2 h-1/2">
|
||||
<Box className="w-1/2 h-1/2 flex justify-center items-center">
|
||||
<MediaViewer
|
||||
media={{
|
||||
id: previewMedia.id || "",
|
||||
@ -453,7 +453,7 @@ export const RightWidgetTab = observer(
|
||||
<Paper
|
||||
className="flex-1 flex flex-col max-w-[500px]"
|
||||
sx={{
|
||||
borderRadius: "16px",
|
||||
borderRadius: "10px",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
elevation={2}
|
||||
@ -473,13 +473,17 @@ export const RightWidgetTab = observer(
|
||||
0 ? (
|
||||
<Box
|
||||
sx={{
|
||||
overflow: "hidden",
|
||||
width: "100%",
|
||||
maxHeight: "290px",
|
||||
flexShrink: 0,
|
||||
padding: "2px 2px 0px 2px",
|
||||
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
"& img": {
|
||||
borderTopLeftRadius: "10px",
|
||||
borderTopRightRadius: "10px",
|
||||
width: "100%",
|
||||
height: "auto",
|
||||
objectFit: "contain",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<MediaViewer
|
||||
@ -513,6 +517,7 @@ export const RightWidgetTab = observer(
|
||||
fontWeight: 700,
|
||||
lineHeight: "120%",
|
||||
backdropFilter: "blur(12px)",
|
||||
borderBottom: "1px solid #A89F90",
|
||||
boxShadow:
|
||||
"inset 4px 4px 12px 0 rgba(255,255,255,0.12)",
|
||||
background:
|
||||
|
Reference in New Issue
Block a user