diff --git a/apps/web/src/components/editor-header.tsx b/apps/web/src/components/editor-header.tsx index 88deaf0cd..6881c135e 100644 --- a/apps/web/src/components/editor-header.tsx +++ b/apps/web/src/components/editor-header.tsx @@ -21,6 +21,7 @@ import { FaDiscord } from "react-icons/fa6"; import { useTheme } from "next-themes"; import { TransitionUpIcon } from "./icons"; import { PanelPresetSelector } from "./panel-preset-selector"; +import { Dialog, DialogContent, DialogHeader, DialogTitle } from "./ui/dialog"; export function EditorHeader() { const { activeProject, renameProject, deleteProject } = useProjectStore(); @@ -139,25 +140,39 @@ export function EditorHeader() { } function ExportButton() { + const [isExportDialogOpen, setIsExportDialogOpen] = useState(false); + const handleExport = () => { - // TODO: Implement export functionality - // NOTE: This is already being worked on - console.log("Export project"); - window.open("https://youtube.com/watch?v=dQw4w9WgXcQ", "_blank"); + setIsExportDialogOpen(true); }; return ( - + + + + + Export Project + +
+

+ Export functionality is not ready yet. We're currently working on + a custom pipeline to make this possible. +

+
+
+
+ ); } diff --git a/apps/web/src/components/editor/properties-panel/text-properties.tsx b/apps/web/src/components/editor/properties-panel/text-properties.tsx index a06624eb2..744c2be50 100644 --- a/apps/web/src/components/editor/properties-panel/text-properties.tsx +++ b/apps/web/src/components/editor/properties-panel/text-properties.tsx @@ -6,7 +6,8 @@ import { useTimelineStore } from "@/stores/timeline-store"; import { Slider } from "@/components/ui/slider"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; -import { useState } from "react"; +import { Switch } from "@/components/ui/switch"; // Add Switch import +import { useState, useRef } from "react"; import { PropertyItem, PropertyItemLabel, @@ -30,6 +31,9 @@ export function TextProperties({ Math.round(element.opacity * 100).toString() ); + // Track the last selected color for toggling + const lastSelectedColor = useRef("#000000"); + const parseAndValidateNumber = ( value: string, min: number, @@ -86,6 +90,20 @@ export function TextProperties({ updateTextElement(trackId, element.id, { opacity: opacityPercent / 100 }); }; + // Update last selected color when a new color is picked + const handleColorChange = (color: string) => { + if (color !== "transparent") { + lastSelectedColor.current = color; + } + updateTextElement(trackId, element.id, { backgroundColor: color }); + }; + + // Toggle between transparent and last selected color + const handleTransparentToggle = (isTransparent: boolean) => { + const newColor = isTransparent ? "transparent" : lastSelectedColor.current; + updateTextElement(trackId, element.id, { backgroundColor: newColor }); + }; + return (