feat: Rewrite route edit and create page for new field

This commit is contained in:
2025-10-30 01:26:32 +03:00
parent 2b48ade2f1
commit 3526648d1f
8 changed files with 1310 additions and 213 deletions

View File

@@ -11,6 +11,7 @@ interface VideoPreviewCardProps {
onDeleteVideoClick: () => void;
onSelectVideoClick: (file?: File) => void;
tooltipText?: string;
className?: string;
}
export const VideoPreviewCard: React.FC<VideoPreviewCardProps> = ({
@@ -20,6 +21,7 @@ export const VideoPreviewCard: React.FC<VideoPreviewCardProps> = ({
onDeleteVideoClick,
onSelectVideoClick,
tooltipText,
className,
}) => {
const fileInputRef = useRef<HTMLInputElement>(null);
const [isDragOver, setIsDragOver] = useState(false);
@@ -89,7 +91,10 @@ export const VideoPreviewCard: React.FC<VideoPreviewCardProps> = ({
gap: 1,
flex: 1,
minWidth: 150,
width: "min-content",
mx: "auto",
}}
className={className}
>
<Box sx={{ display: "flex", alignItems: "center" }}>
<Typography variant="subtitle2" gutterBottom sx={{ mb: 0, mr: 0.5 }}>
@@ -127,7 +132,10 @@ export const VideoPreviewCard: React.FC<VideoPreviewCardProps> = ({
</button>
)}
{videoId ? (
<Box sx={{ position: "relative", width: "100%", height: "100%" }}>
<Box
sx={{ position: "relative", width: "100%", height: "100%" }}
className={className}
>
<video
src={`${
import.meta.env.VITE_KRBL_MEDIA