🎥 Make videos programmatically with React
more responsive layout
Jonny Burgerd2c3355a693f
diff --git a/packages/convert/app/components/ConvertUi.tsx b/packages/convert/app/components/ConvertUi.tsxindex 5a73f9afc3..5805ec6ad6 100644--- a/packages/convert/app/components/ConvertUi.tsx+++ b/packages/convert/app/components/ConvertUi.tsx@@ -1,5 +1,5 @@import {Button} from '@/components/ui/button';-import {CardContent, CardTitle} from '@/components/ui/card';+import {CardTitle} from '@/components/ui/card';import {Label} from '@/components/ui/label';import {Select,@@ -125,8 +125,8 @@ export default function ConvertUI({src}: {readonly src: Source}) {}, [state]);return (- <div className="w-[380px]">- <CardContent className="gap-4">+ <div className="w-full lg:w-[350px]">+ <div className="gap-4">{state.type === 'error' ? (<><ErrorState error={state.error} />@@ -225,7 +225,7 @@ export default function ConvertUI({src}: {readonly src: Source}) {</Button></>)}- </CardContent>+ </div></div>);}diff --git a/packages/convert/app/components/DropFileBox.tsx b/packages/convert/app/components/DropFileBox.tsxindex a23f307ab6..7506512a3e 100644--- a/packages/convert/app/components/DropFileBox.tsx+++ b/packages/convert/app/components/DropFileBox.tsx@@ -21,7 +21,7 @@ export const DropFileBox: React.FC<{);return (- <Card className="w-[400px] h-[300px] flex justify-center items-center">+ <Card className="w-full max-w-[600px] lg:w-[400px] h-[300px] flex justify-center items-center"><inputref={ref}type="file"diff --git a/packages/convert/app/components/FileAvailable.tsx b/packages/convert/app/components/FileAvailable.tsxindex 191b73e03c..8ba948d259 100644--- a/packages/convert/app/components/FileAvailable.tsx+++ b/packages/convert/app/components/FileAvailable.tsx@@ -15,31 +15,38 @@ export const FileAvailable: React.FC<{}, [setSrc]);return (- <>+ <div className="overflow-y-auto w-full lg:flex lg:justify-center pt-6 pb-10 px-4"><div>- <Button variant="link" onClick={clear}>- <svg- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 448 512"- style={{height: 16}}- >- <path- fill="currentcolor"- d="M18.2 273l-17-17 17-17L171.8 85.4l17-17 33.9 33.9-17 17L93.1 232 424 232l24 0 0 48-24 0L93.1 280 205.8 392.6l17 17-33.9 33.9-17-17L18.2 273z"- />- </svg>- <div className="w-2" />- Choose another file- </Button>- <div className="gap-16 flex flex-row items-center justify-center">+ <div className="block">+ <Button variant="link" onClick={clear}>+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 448 512"+ style={{height: 16}}+ >+ <path+ fill="currentcolor"+ d="M18.2 273l-17-17 17-17L171.8 85.4l17-17 33.9 33.9-17 17L93.1 232 424 232l24 0 0 48-24 0L93.1 280 205.8 392.6l17 17-33.9 33.9-17-17L18.2 273z"+ />+ </svg>+ <div className="w-2" />+ Choose another file+ </Button>+ </div>+ <div className="lg:inline-flex lg:flex-row"><Probesrc={src}probeDetails={probeDetails}setProbeDetails={setProbeDetails}/>- {probeDetails ? null : <ConvertUI src={src} />}+ {probeDetails ? null : (+ <>+ <div className="h-8 lg:h-0 lg:w-6" />+ <ConvertUI src={src} />+ </>+ )}</div></div>- </>+ </div>);};diff --git a/packages/convert/app/components/PickFile.tsx b/packages/convert/app/components/PickFile.tsxindex 60912b275e..fec89cbbf2 100644--- a/packages/convert/app/components/PickFile.tsx+++ b/packages/convert/app/components/PickFile.tsx@@ -27,7 +27,7 @@ export const PickFile: React.FC<{return (<div- className="text-center items-center justify-center flex flex-col h-full w-full"+ className="text-center items-center justify-center flex flex-col h-full w-full p-4 pt-20"onDragOver={onDragOver}onDrop={onDrop}>diff --git a/packages/convert/app/components/Probe.tsx b/packages/convert/app/components/Probe.tsxindex 51dd421f4c..a17089acba 100644--- a/packages/convert/app/components/Probe.tsx+++ b/packages/convert/app/components/Probe.tsx@@ -236,10 +236,7 @@ export const Probe: React.FC<{return (<Card- className={- (probeDetails ? 'w-[800px]' : 'w-[350px]') +- ' h-5/6 max-h-[700px] flex flex-col max-w-[90vw] overflow-hidden'- }+ className={`w-full lg:${probeDetails ? 'w-[800px]' : 'w-[350px]'} max-h-[700px] overflow-hidden`}><VideoThumbnail thumbnail={thumbnail} /><CardHeader className="border-b-2 border-black">@@ -251,7 +248,7 @@ export const Probe: React.FC<{</CardDescription></CardHeader>{sortedTracks.length && probeDetails ? (- <div className="pl-6 pr-6">+ <div className=" pr-6 border-b-2 border-black"><TrackSwitcherselectedTrack={trackDetails}sortedTracks={sortedTracks}diff --git a/packages/convert/app/components/TrackSwitcher.tsx b/packages/convert/app/components/TrackSwitcher.tsxindex ea017a91a9..a26600e9a1 100644--- a/packages/convert/app/components/TrackSwitcher.tsx+++ b/packages/convert/app/components/TrackSwitcher.tsx@@ -37,7 +37,6 @@ export const TrackSwitcher: React.FC<{);})}</div>- <div className="h-4" /></div>) : null}</div>diff --git a/packages/convert/app/routes/_index.tsx b/packages/convert/app/routes/_index.tsxindex e280757af2..ccc37440ca 100644--- a/packages/convert/app/routes/_index.tsx+++ b/packages/convert/app/routes/_index.tsx@@ -18,7 +18,7 @@ const Index = () => {);return (- <div className="font-sans flex justify-center items-center h-screen bg-slate-50 ">+ <div className="font-sans min-h-screen bg-slate-50">{src ? (<FileAvailable src={src} setSrc={setSrc} />) : (