Open source CapCut alternative.
TypeScript
Fix bugs
David Leaeeedca2456a
diff --git a/site/src/cut/components/SidePanel.tsx b/site/src/cut/components/SidePanel.tsxindex dcc10c25..a05f095b 100644--- a/site/src/cut/components/SidePanel.tsx+++ b/site/src/cut/components/SidePanel.tsx@@ -1,7 +1,7 @@"use client";import { useEffect, useRef, useState } from "react";-import { Captions, Check, Circle, Copy, Film, FolderOpen, FolderPlus, Loader2, Mic, Music, Play, Plus, Send, Type, Upload, Video } from "lucide-react";+import { Captions, Check, Circle, Copy, Film, FolderOpen, FolderPlus, Loader2, Mic, Music, Play, Plus, Send, Upload, Video } from "lucide-react";import { Button } from "@/components/ui/button";import {DropdownMenu,@@ -27,13 +27,12 @@ import { PlatformPreviewDialog, type ExportItem } from "./PlatformPreview";import { RecordDialog, type RecordMode } from "./RecordDialog";import { SubtitlesPanel } from "./SubtitlesPanel";-type Tab = "media" | "library" | "record" | "text" | "subtitles" | "publish";+type Tab = "media" | "library" | "record" | "subtitles" | "publish";const TABS: { id: Tab; label: string; icon: typeof Film }[] = [{ id: "media", label: "Media", icon: Film },{ id: "library", label: "Library", icon: FolderOpen },{ id: "record", label: "Record", icon: Circle },- { id: "text", label: "Text", icon: Type },{ id: "subtitles", label: "Subtitles", icon: Captions },{ id: "publish", label: "Publish", icon: Send },];@@ -113,7 +112,6 @@ export function SidePanel({<MediaPanel projectId={projectId} onImport={onImport} importing={importing} />)}{tab === "library" && <LibraryPanel projectId={projectId} />}- {tab === "text" && <TextPanel />}{tab === "subtitles" && <SubtitlesPanel />}{tab === "publish" && <PublishPanel />}</div>@@ -369,28 +367,6 @@ function LibraryPanel({ projectId }: { projectId: string }) {);}-function TextPanel() {- return (- <>- <PanelHead title="Text" />- <div className="px-3.5">- <Button- variant="outline"- className="w-full"- onClick={() => useEditor.getState().addOverlay()}- >- <Type data-icon="inline-start" /> Add a title- </Button>- <p className="mt-3 text-[11.5px] leading-relaxed text-muted-foreground">- Titles land at the playhead. Drag them around the preview, resize with- the corner handle, and double-click to edit in place. Font, color,- shadow, and backdrop are in the inspector.- </p>- </div>- </>- );-}-function CopyChip({ text, label }: { text: string; label: string }) {const [copied, setCopied] = useState(false);return (diff --git a/site/src/cut/components/TopBar.tsx b/site/src/cut/components/TopBar.tsxindex 1ea60989..296c054e 100644--- a/site/src/cut/components/TopBar.tsx+++ b/site/src/cut/components/TopBar.tsx@@ -47,7 +47,7 @@ export function TopBar() {{a === "9:16" ? "TikTok, Reels, Shorts" : "YouTube"}</span></span>- {aspect === a && <Check className="size-3.5 text-coral" />}+ {aspect === a && <Check className="size-3.5 text-muted-foreground" />}</DropdownMenuItem>))}</DropdownMenuContent>@@ -63,8 +63,14 @@ export function TopBar() {><ChevronLeft /></Button>- <span className="grid size-[22px] shrink-0 place-items-center overflow-hidden rounded-md">- <img src="/donkey-logo.svg" alt="Donkey" className="block h-full w-full object-contain" />+ <span className="grid size-[22px] shrink-0 place-items-center">+ <img+ src="/donkey-logo.svg"+ alt="Donkey"+ width={22}+ height={22}+ className="block h-full w-full object-contain"+ /></span>{editing ? (<input