Skip to content

Open source CapCut alternative.

TypeScript

fix(cut): stretch the file-drop target to the full content area

David Le6cfc4f54dd46
diff --git a/site/src/cut/components/LibraryView.tsx b/site/src/cut/components/LibraryView.tsx
index 8c159ece..36a6f2ef 100644
--- a/site/src/cut/components/LibraryView.tsx
+++ b/site/src/cut/components/LibraryView.tsx
@@ -211,7 +211,7 @@ export function LibraryView() {
return (
<div
className={cn(
- "mx-auto w-full max-w-6xl px-10 py-9",
+ "min-h-full",
fileOver &&
"rounded-3xl outline-2 outline-dashed outline-offset-[-10px] outline-[#0a84ff]/60"
)}
@@ -242,6 +242,7 @@ export function LibraryView() {
void upload(e.dataTransfer.files);
}}
>
+ <div className="mx-auto w-full max-w-6xl px-10 py-9">
<div className="mb-5 flex items-center justify-between gap-4">
{openFolder === null ? (
<h1 className="text-lg font-semibold tracking-tight">Library</h1>
@@ -453,6 +454,7 @@ export function LibraryView() {
</AlertDialogContent>
</AlertDialog>
</div>
+ </div>
);
}
diff --git a/site/src/cut/components/ProjectsHome.tsx b/site/src/cut/components/ProjectsHome.tsx
index 27efc6ca..803d6bc7 100644
--- a/site/src/cut/components/ProjectsHome.tsx
+++ b/site/src/cut/components/ProjectsHome.tsx
@@ -310,7 +310,7 @@ export function ProjectsHome() {
return (
<div
className={cn(
- "relative mx-auto w-full max-w-6xl px-10 py-9",
+ "min-h-full",
fileOver &&
"rounded-3xl outline-2 outline-dashed outline-offset-[-10px] outline-[#0a84ff]/60"
)}
@@ -341,6 +341,7 @@ export function ProjectsHome() {
void importFilesAsProjects(e.dataTransfer.files, openFolder);
}}
>
+ <div className="relative mx-auto w-full max-w-6xl px-10 py-9">
{importing > 0 && (
<div className="pointer-events-none fixed right-6 bottom-6 z-50 flex items-center gap-2 rounded-full bg-foreground/90 px-3.5 py-2.5 text-background shadow-lg">
<Loader2 className="size-5 animate-spin" />
@@ -634,6 +635,7 @@ export function ProjectsHome() {
</AlertDialogContent>
</AlertDialog>
</div>
+ </div>
);
}