+ {templates.length === 0 && (
+
+ No saved templates
+
+ )}
+
+ {templates.map((template) => (
+
+
+ {template.name}
+
+
+
+
+
+
+
+
+
+
+ ))}
+
+ );
+}
\ No newline at end of file
diff --git a/src/components/VideoEditor.tsx b/src/components/VideoEditor.tsx
index 7f4ce60e..022735ad 100644
--- a/src/components/VideoEditor.tsx
+++ b/src/components/VideoEditor.tsx
@@ -16,6 +16,9 @@ import {
Layers, Crop, Scissors, RotateCw, Volume2,
SlidersHorizontal, Zap, AlertTriangle, Github
} from "lucide-react";
+import CustomTemplateManager from "./CustomTemplateManager";
+
+import {saveTemplate,} from "@/lib/templateStorage";
interface SectionProps {
icon: React.ReactNode;
@@ -50,6 +53,19 @@ export default function VideoEditor() {
} = useVideoEditor();
const isProcessing = status === "loading-engine" || status === "exporting";
+ const handleSaveTemplate = () => {
+ const name = prompt(
+ "Template name"
+ );
+
+ if (!name) return;
+
+ saveTemplate({
+ id: crypto.randomUUID(),
+ name,
+ recipe,
+ });
+};
return (
@@ -132,15 +148,33 @@ export default function VideoEditor() {
"space-y-5",
isProcessing && "pointer-events-none opacity-50"
)}>
-
-
} title="Output size">
-
-
-
-
} title="Framing" delay={100}>
-
-
-
+
+
+
} title="Templates">
+
+
+
+ updateRecipe(savedRecipe)
+ }
+ />
+
+
+ } title="Output size">
+
+
+
+ } title="Framing" delay={100}>
+
+
+
+