diff options
Diffstat (limited to 'apps/web/src/components')
| -rw-r--r-- | apps/web/src/components/editor/timeline.tsx | 20 | ||||
| -rw-r--r-- | apps/web/src/components/header.tsx | 26 | ||||
| -rw-r--r-- | apps/web/src/components/landing/hero.tsx | 8 |
3 files changed, 37 insertions, 17 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx index 6c39c893..16dcb34f 100644 --- a/apps/web/src/components/editor/timeline.tsx +++ b/apps/web/src/components/editor/timeline.tsx @@ -568,8 +568,8 @@ export function Timeline() { >
{/* Show overlay when dragging media over the timeline */}
{isDragOver && (
- <div className="absolute inset-0 z-20 flex items-center justify-center pointer-events-none">
- <div className="bg-accent/80 text-accent-foreground px-8 py-4 rounded-lg shadow-lg text-lg font-semibold border border-accent">
+ <div className="absolute inset-0 z-20 flex items-center justify-center pointer-events-none backdrop-blur-lg">
+ <div>
Drop media here to add to timeline
</div>
</div>
@@ -935,6 +935,7 @@ export function Timeline() { track={track}
zoomLevel={zoomLevel}
setContextMenu={setContextMenu}
+ contextMenu={contextMenu}
/>
</div>
))}
@@ -1119,6 +1120,7 @@ function TimelineTrackContent({ track,
zoomLevel,
setContextMenu,
+ contextMenu,
}: {
track: TimelineTrack;
zoomLevel: number;
@@ -1131,6 +1133,13 @@ function TimelineTrackContent({ y: number;
} | null
) => void;
+ contextMenu: {
+ type: "track" | "clip";
+ trackId: string;
+ clipId?: string;
+ x: number;
+ y: number;
+ } | null;
}) {
const { mediaItems } = useMediaStore();
const {
@@ -1717,6 +1726,13 @@ function TimelineTrackContent({ style={{ width: `${clipWidth}px`, left: `${clipLeft}px` }}
onClick={(e) => {
e.stopPropagation();
+
+ // Close context menu if it's open
+ if (contextMenu) {
+ setContextMenu(null);
+ return; // Don't handle selection when closing context menu
+ }
+
const isSelected = selectedClips.some(
(c) => c.trackId === track.id && c.clipId === clip.id
);
diff --git a/apps/web/src/components/header.tsx b/apps/web/src/components/header.tsx index 812b0afc..27503cd0 100644 --- a/apps/web/src/components/header.tsx +++ b/apps/web/src/components/header.tsx @@ -41,17 +41,21 @@ export function Header() { Contributors
</Button>
</Link>
- <Link href="https://github.com/OpenCut-app/OpenCut" target="_blank">
- <Button variant="text" className="text-sm">
- GitHub
- </Button>
- </Link>
- <Link href={session ? "/editor" : "/auth/login"}>
- <Button size="sm" className="text-sm ml-4">
- Start editing
- <ArrowRight className="h-4 w-4" />
- </Button>
- </Link>
+ {process.env.NODE_ENV === "development" ? (
+ <Link href="/editor">
+ <Button size="sm" className="text-sm ml-4">
+ Editor
+ <ArrowRight className="h-4 w-4" />
+ </Button>
+ </Link>
+ ) : (
+ <Link href="https://github.com/OpenCut-app/OpenCut" target="_blank">
+ <Button size="sm" className="text-sm ml-4">
+ GitHub
+ <ArrowRight className="h-4 w-4" />
+ </Button>
+ </Link>
+ )}
</nav>
);
diff --git a/apps/web/src/components/landing/hero.tsx b/apps/web/src/components/landing/hero.tsx index 2830097d..7b4588c8 100644 --- a/apps/web/src/components/landing/hero.tsx +++ b/apps/web/src/components/landing/hero.tsx @@ -82,12 +82,12 @@ export function Hero({ signupCount }: HeroProps) { };
return (
- <div className="relative min-h-[calc(100vh-4rem)] flex flex-col items-center justify-center text-center px-4">
+ <div className="min-h-[calc(100vh-4rem)] flex flex-col justify-between items-center text-center px-4">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 1 }}
- className="max-w-3xl mx-auto"
+ className="max-w-3xl mx-auto w-full flex-1 flex flex-col justify-center"
>
<motion.div
initial={{ opacity: 0, y: 20 }}
@@ -148,7 +148,7 @@ export function Hero({ signupCount }: HeroProps) { initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.8, duration: 0.6 }}
- className="mt-6 inline-flex items-center gap-2 bg-muted/30 px-4 py-2 rounded-full text-sm text-muted-foreground"
+ className="mt-8 inline-flex items-center gap-2 text-sm text-muted-foreground justify-center"
>
<div className="w-2 h-2 bg-green-500 rounded-full animate-pulse" />
<span>{signupCount.toLocaleString()} people already joined</span>
@@ -157,7 +157,7 @@ export function Hero({ signupCount }: HeroProps) { </motion.div>
<motion.div
- className="absolute bottom-12 left-0 right-0 text-center text-sm text-muted-foreground/60"
+ className="mb-8 text-center text-sm text-muted-foreground/60"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.8, duration: 0.8 }}
|
