The open-source CapCut alternative
add forward and backward buttons to non-fullscreen view (#495)
vractob229d94a8da7
diff --git a/apps/web/package.json b/apps/web/package.jsonindex f5cd7da4..9531b6c7 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -43,7 +43,7 @@"input-otp": "^1.4.1","lucide-react": "^0.468.0","motion": "^12.18.1",- "next": "^15.4.3",+ "next": "^15.4.5","next-themes": "^0.4.4","pg": "^8.16.2","radix-ui": "^1.4.2",diff --git a/apps/web/src/app/contributors/page.tsx b/apps/web/src/app/contributors/page.tsxindex 6a524866..29151bd8 100644--- a/apps/web/src/app/contributors/page.tsx+++ b/apps/web/src/app/contributors/page.tsx@@ -5,8 +5,14 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";import { Button } from "@/components/ui/button";import { ExternalLink } from "lucide-react";import Link from "next/link";-import { GithubIcon } from "@/components/icons";+import {+ GithubIcon,+ MarbleIcon,+ VercelIcon,+ DataBuddyIcon,+} from "@/components/icons";import { Badge } from "@/components/ui/badge";+import { EXTERNAL_TOOLS } from "@/constants/site";export const metadata: Metadata = {title: "Contributors - OpenCut",@@ -39,7 +45,7 @@ async function getContributors(): Promise<Contributor[]> {"User-Agent": "OpenCut-Web-App",},next: { revalidate: 600 }, // 10 minutes- }+ } as RequestInit);if (!response.ok) {@@ -236,6 +242,53 @@ export default async function ContributorsPage() {</div>)}+ <div className="mt-6 mb-20">+ <div className="text-center mb-12">+ <h2 className="text-2xl font-semibold mb-2">External Tools</h2>+ <p className="text-muted-foreground">+ Tools we use to build OpenCut+ </p>+ </div>++ <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6 max-w-4xl mx-auto">+ {EXTERNAL_TOOLS.map((tool, index) => {+ const IconComponent = {+ MarbleIcon,+ VercelIcon,+ DataBuddyIcon,+ }[tool.icon];++ return (+ <Link+ key={tool.name}+ href={tool.url}+ target="_blank"+ className="group block"+ style={{+ animationDelay: `${index * 100}ms`,+ }}+ >+ <Card className="h-full bg-background/80 backdrop-blur-sm border-2 group-hover:border-muted-foreground/20 transition-all duration-300 group-hover:shadow-xl">+ <CardContent className="p-6 text-center h-full flex flex-col">+ <div className="mb-4">+ <div className="w-12 h-12 mx-auto rounded-full bg-muted/50 flex items-center justify-center group-hover:bg-muted/70 transition-colors">+ <IconComponent className="h-6 w-6" size={24} />+ </div>+ </div>+ <h3 className="font-semibold text-lg mb-2 group-hover:text-foreground/80 transition-colors">+ {tool.name}+ </h3>+ <p className="text-sm text-muted-foreground flex-1">+ {tool.description}+ </p>+ </CardContent>+ </Card>+ </Link>+ );+ })}+ </div>+ </div>+<div className="mt-32 text-center"><div className="max-w-2xl mx-auto"><h2 className="text-3xl font-bold mb-4">Join the community</h2>diff --git a/apps/web/src/components/editor/preview-panel.tsx b/apps/web/src/components/editor/preview-panel.tsxindex 4cc35bb5..39c6795f 100644--- a/apps/web/src/components/editor/preview-panel.tsx+++ b/apps/web/src/components/editor/preview-panel.tsx@@ -826,6 +826,18 @@ function PreviewToolbar({setCanvasSizeToOriginal(aspectRatio);};+ const totalDuration = getTotalDuration();++ const skipBackward = () => {+ const newTime = Math.max(0, currentTime - 1);+ setCurrentTime(newTime);+ };++ const skipForward = () => {+ const newTime = Math.min(totalDuration, currentTime + 1);+ setCurrentTime(newTime);+ };+if (isExpanded) {return (<FullscreenToolbar@@ -871,19 +883,41 @@ function PreviewToolbar({</span></p></div>- <Button- variant="text"- size="icon"- onClick={toggle}- disabled={!hasAnyElements}- className="h-auto p-0"- >- {isPlaying ? (- <Pause className="h-3 w-3" />- ) : (- <Play className="h-3 w-3" />- )}- </Button>+ <div className="flex items-center gap-1">+ <Button+ variant="text"+ size="icon"+ onClick={skipBackward}+ disabled={!hasAnyElements}+ className="h-auto p-0 text-white hover:text-white/80"+ title="Skip backward 1s"+ >+ <SkipBack className="h-3 w-3" />+ </Button>+ <Button+ variant="text"+ size="icon"+ onClick={toggle}+ disabled={!hasAnyElements}+ className="h-auto p-0 text-white hover:text-white/80"+ >+ {isPlaying ? (+ <Pause className="h-3 w-3" />+ ) : (+ <Play className="h-3 w-3" />+ )}+ </Button>+ <Button+ variant="text"+ size="icon"+ onClick={skipForward}+ disabled={!hasAnyElements}+ className="h-auto p-0 text-white hover:text-white/80"+ title="Skip forward 1s"+ >+ <SkipForward className="h-3 w-3" />+ </Button>+ </div><div className="flex items-center gap-3"><BackgroundSettings /><DropdownMenu>diff --git a/apps/web/src/components/icons.tsx b/apps/web/src/components/icons.tsxindex 6099c052..43f953e8 100644--- a/apps/web/src/components/icons.tsx+++ b/apps/web/src/components/icons.tsx@@ -113,3 +113,53 @@ export function BackgroundIcon({ className }: { className?: string }) {</svg>);}++export function MarbleIcon({+ className = "",+ size = 32,+}: {+ className?: string;+ size?: number;+}) {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width={size}+ height={size}+ className={className}+ fill="none"+ viewBox="0 0 256 256"+ >+ <path fill="#202027" d="M0 0h256v256H0z" />+ <path+ fill="#fff"+ d="M116.032 94.016q1.408.256 6.272 9.856 4.856 9.472 11.904 24.576l4.096 8.576a42.4 42.4 0 0 0 4.992-6.784q2.304-3.96 5.76-10.624 3.96-7.56 5.504-9.728 6.144-9.344 13.312-19.84.896-1.408 3.2-1.92a4.8 4.8 0 0 1 1.28-.128q3.072 0 6.784 2.56 3.84 2.56 4.992 5.248a4.8 4.8 0 0 1 .256 1.92q0 1.28-.128 1.92l-.64 2.944q-.256 1.664-.512 3.968a3200 3200 0 0 0-5.888 46.848 56 56 0 0 0-.512 8.064l-.256 4.096a32 32 0 0 0-.128 2.944q0 1.672-.384 2.304-.384.64-1.408.64-.768 0-2.304-.384-4.096-.896-6.272-3.2-2.176-2.432-2.432-6.656-.128-2.176-.128-6.784 0-4.736.256-14.464l.128-7.04.256-10.112q-1.152 1.024-5.888 8.064a328 328 0 0 0-9.088 14.464q-4.48 7.56-5.888 11.648-1.28 3.2-2.56 4.736-1.152 1.536-2.816 1.536-1.536 0-3.968-1.408-6.912-4.224-8.448-11.648a336 336 0 0 0-6.016-23.68 40 40 0 0 0-2.56-6.272q-1.792-3.968-2.304-4.992l-1.664-3.328q-18.68 24.832-25.344 45.568-1.28 4.352-2.432 6.272-1.152 1.792-2.688 1.792-2.432 0-6.912-4.352Q72 158.144 72 154.304q0-2.04.768-4.096a108 108 0 0 1 16-30.08l3.968-5.248a432 432 0 0 0 12.16-16.64q3.072-4.48 8.192-4.48.896 0 2.944.256"+ />+ </svg>+ );+}++export function DataBuddyIcon({+ className = "",+ size = 32,+}: {+ className?: string;+ size?: number;+}) {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width={size}+ height={size}+ className={className}+ viewBox="0 0 8 8"+ shapeRendering="crispEdges"+ >+ <path d="M0 0h8v8H0z" />+ <path+ fill="#fff"+ d="M1 1h1v6H1zm1 0h4v1H2zm4 1h1v1H6zm0 1h1v1H6zm0 1h1v1H6zm0 1h1v1H6zM2 6h4v1H2zm1-3h1v1H3zm1 1h1v1H4z"+ />+ </svg>+ );+}diff --git a/apps/web/src/constants/site.ts b/apps/web/src/constants/site.tsindex f47f6470..00bd649f 100644--- a/apps/web/src/constants/site.ts+++ b/apps/web/src/constants/site.ts@@ -9,3 +9,25 @@ export const SITE_INFO = {twitterImage: "/open-graph/default.jpg",favicon: "/favicon.ico",};++export const EXTERNAL_TOOLS = [+ {+ name: "Marble",+ description:+ "Modern headless CMS for content management and the blog for OpenCut",+ url: "https://marblecms.com?utm_source=opencut",+ icon: "MarbleIcon" as const,+ },+ {+ name: "Vercel",+ description: "Platform where we deploy and host OpenCut",+ url: "https://vercel.com?utm_source=opencut",+ icon: "VercelIcon" as const,+ },+ {+ name: "Databuddy",+ description: "GDPR compliant analytics and user insights for OpenCut",+ url: "https://databuddy.cc?utm_source=opencut",+ icon: "DataBuddyIcon" as const,+ },+];diff --git a/bun.lock b/bun.lockindex 72bd43c3..f571e022 100644--- a/bun.lock+++ b/bun.lock@@ -46,7 +46,7 @@"input-otp": "^1.4.1","lucide-react": "^0.468.0","motion": "^12.18.1",- "next": "^15.4.3",+ "next": "^15.4.5","next-themes": "^0.4.4","pg": "^8.16.2","radix-ui": "^1.4.2",@@ -1314,7 +1314,7 @@"next/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],- "opencut/next": ["[email protected]", "", { "dependencies": { "@next/env": "15.4.3", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.4.3", "@next/swc-darwin-x64": "15.4.3", "@next/swc-linux-arm64-gnu": "15.4.3", "@next/swc-linux-arm64-musl": "15.4.3", "@next/swc-linux-x64-gnu": "15.4.3", "@next/swc-linux-x64-musl": "15.4.3", "@next/swc-win32-arm64-msvc": "15.4.3", "@next/swc-win32-x64-msvc": "15.4.3", "sharp": "^0.34.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-uW7Qe6poVasNIE1X382nI29oxSdFJzjQzTgJFLD43MxyPfGKKxCMySllhBpvqr48f58Om+tLMivzRwBpXEytvA=="],+ "opencut/next": ["[email protected]", "", { "dependencies": { "@next/env": "15.4.5", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.4.5", "@next/swc-darwin-x64": "15.4.5", "@next/swc-linux-arm64-gnu": "15.4.5", "@next/swc-linux-arm64-musl": "15.4.5", "@next/swc-linux-x64-gnu": "15.4.5", "@next/swc-linux-x64-musl": "15.4.5", "@next/swc-win32-arm64-msvc": "15.4.5", "@next/swc-win32-x64-msvc": "15.4.5", "sharp": "^0.34.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-nJ4v+IO9CPmbmcvsPebIoX3Q+S7f6Fu08/dEWu0Ttfa+wVwQRh9epcmsyCPjmL2b8MxC+CkBR97jgDhUUztI3g=="],"opencut/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],@@ -1392,23 +1392,23 @@"motion/framer-motion/motion-utils": ["[email protected]", "", {}, "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ=="],- "opencut/next/@next/env": ["@next/[email protected]", "", {}, "sha512-lKJ9KJAvaWzqurIsz6NWdQOLj96mdhuDMusLSYHw9HBe2On7BjUwU1WeRvq19x7NrEK3iOgMeSBV5qEhVH1cMw=="],+ "opencut/next/@next/env": ["@next/[email protected]", "", {}, "sha512-ruM+q2SCOVCepUiERoxOmZY9ZVoecR3gcXNwCYZRvQQWRjhOiPJGmQ2fAiLR6YKWXcSAh7G79KEFxN3rwhs4LQ=="],- "opencut/next/@next/swc-darwin-arm64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-YAhZWKeEYY7LHQJiQ8fe3Y6ymfcDcTn7rDC8PDu/pdeIl1Z2LHD4uyPNuQUGCEQT//MSNv6oZCeQzZfTCKZv+A=="],+ "opencut/next/@next/swc-darwin-arm64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-84dAN4fkfdC7nX6udDLz9GzQlMUwEMKD7zsseXrl7FTeIItF8vpk1lhLEnsotiiDt+QFu3O1FVWnqwcRD2U3KA=="],- "opencut/next/@next/swc-darwin-x64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-ZPHRdd51xaxCMpT4viQ6h8TgYM1zPW1JIeksPY9wKlyvBVUQqrWqw8kEh1sa7/x0Ied+U7pYHkAkutrUwxbMcg=="],+ "opencut/next/@next/swc-darwin-x64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-CL6mfGsKuFSyQjx36p2ftwMNSb8PQog8y0HO/ONLdQqDql7x3aJb/wB+LA651r4we2pp/Ck+qoRVUeZZEvSurA=="],- "opencut/next/@next/swc-linux-arm64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-QUdqftCXC5vw5cowucqi9FeOPQ0vdMxoOHLY0J5jPdercwSJFjdi9CkEO4Xkq1eG4t1TB/BG81n6rmTsWoILnw=="],+ "opencut/next/@next/swc-linux-arm64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-1hTVd9n6jpM/thnDc5kYHD1OjjWYpUJrJxY4DlEacT7L5SEOXIifIdTye6SQNNn8JDZrcN+n8AWOmeJ8u3KlvQ=="],- "opencut/next/@next/swc-linux-arm64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-HTL31NsmoafX+r5g91Yj3+q34nrn1xKmCWVuNA+fUWO4X0pr+n83uGzLyEOn0kUqbMZ40KmWx+4wsbMoUChkiQ=="],+ "opencut/next/@next/swc-linux-arm64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-4W+D/nw3RpIwGrqpFi7greZ0hjrCaioGErI7XHgkcTeWdZd146NNu1s4HnaHonLeNTguKnL2Urqvj28UJj6Gqw=="],- "opencut/next/@next/swc-linux-x64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-HRQLWoeFkKXd2YCEEy9GhfwOijRm37x4w5r0MMVHxBKSA6ms3JoPUXvGhfHT6srnGRcEUWNrQ2vzkHir5ZWTSw=="],+ "opencut/next/@next/swc-linux-x64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-N6Mgdxe/Cn2K1yMHge6pclffkxzbSGOydXVKYOjYqQXZYjLCfN/CuFkaYDeDHY2VBwSHyM2fUjYBiQCIlxIKDA=="],- "opencut/next/@next/swc-linux-x64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-NyXUx6G7AayaRGUsVPenuwhyAoyxjQuQPaK50AXoaAHPwRuif4WmSrXUs8/Y0HJIZh8E/YXRm9H7uuGfiacpuQ=="],+ "opencut/next/@next/swc-linux-x64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-YZ3bNDrS8v5KiqgWE0xZQgtXgCTUacgFtnEgI4ccotAASwSvcMPDLua7BWLuTfucoRv6mPidXkITJLd8IdJplQ=="],- "opencut/next/@next/swc-win32-arm64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-2CUTmpzN/7cL1a7GjdLkDFlfH3nwMwW8a6JiaAUsL9MtKmNNO3fnXqnY0Zk30fii3hVEl4dr7ztrpYt0t2CcGQ=="],+ "opencut/next/@next/swc-win32-arm64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-9Wr4t9GkZmMNcTVvSloFtjzbH4vtT4a8+UHqDoVnxA5QyfWe6c5flTH1BIWPGNWSUlofc8dVJAE7j84FQgskvQ=="],- "opencut/next/@next/swc-win32-x64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-i54YgUhvrUQxQD84SjAbkfWhYkOdm/DNRAVekCHLWxVg3aUbyC6NFQn9TwgCkX5QAS2pXCJo3kFboSFvrsd7dA=="],+ "opencut/next/@next/swc-win32-x64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-voWk7XtGvlsP+w8VBz7lqp8Y+dYw/MTI4KeS0gTVtfdhdJ5QwhXLmNrndFOin/MDoCvUaLWMkYKATaCoUkt2/A=="],"opencut/next/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],