mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: export notice dialog
This commit is contained in:
@@ -21,6 +21,7 @@ import { FaDiscord } from "react-icons/fa6";
|
|||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import { TransitionUpIcon } from "./icons";
|
import { TransitionUpIcon } from "./icons";
|
||||||
import { PanelPresetSelector } from "./panel-preset-selector";
|
import { PanelPresetSelector } from "./panel-preset-selector";
|
||||||
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "./ui/dialog";
|
||||||
|
|
||||||
export function EditorHeader() {
|
export function EditorHeader() {
|
||||||
const { activeProject, renameProject, deleteProject } = useProjectStore();
|
const { activeProject, renameProject, deleteProject } = useProjectStore();
|
||||||
@@ -139,25 +140,39 @@ export function EditorHeader() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ExportButton() {
|
function ExportButton() {
|
||||||
|
const [isExportDialogOpen, setIsExportDialogOpen] = useState(false);
|
||||||
|
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
// TODO: Implement export functionality
|
setIsExportDialogOpen(true);
|
||||||
// NOTE: This is already being worked on
|
|
||||||
console.log("Export project");
|
|
||||||
window.open("https://youtube.com/watch?v=dQw4w9WgXcQ", "_blank");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<>
|
||||||
className="flex items-center gap-1.5 bg-[#38BDF8] text-white rounded-md px-[0.12rem] py-[0.12rem] cursor-pointer hover:brightness-95 transition-all duration-200"
|
<button
|
||||||
onClick={handleExport}
|
className="flex items-center gap-1.5 bg-[#38BDF8] text-white rounded-md px-[0.12rem] py-[0.12rem] cursor-pointer hover:brightness-95 transition-all duration-200"
|
||||||
>
|
onClick={handleExport}
|
||||||
<div className="flex items-center gap-1.5 bg-linear-270 from-[#2567EC] to-[#37B6F7] rounded-[0.8rem] px-4 py-1 relative shadow-[0_1px_3px_0px_rgba(0,0,0,0.65)]">
|
>
|
||||||
<TransitionUpIcon className="z-50" />
|
<div className="flex items-center gap-1.5 bg-linear-270 from-[#2567EC] to-[#37B6F7] rounded-[0.8rem] px-4 py-1 relative shadow-[0_1px_3px_0px_rgba(0,0,0,0.65)]">
|
||||||
<span className="text-[0.875rem] z-50">Export</span>
|
<TransitionUpIcon className="z-50" />
|
||||||
<div className="absolute w-full h-full left-0 top-0 bg-linear-to-t from-white/0 to-white/50 z-10 rounded-[0.8rem] flex items-center justify-center">
|
<span className="text-[0.875rem] z-50">Export</span>
|
||||||
<div className="absolute w-[calc(100%-2px)] h-[calc(100%-2px)] top-[0.08rem] bg-linear-270 from-[#2567EC] to-[#37B6F7] z-50 rounded-[0.8rem]"></div>
|
<div className="absolute w-full h-full left-0 top-0 bg-linear-to-t from-white/0 to-white/50 z-10 rounded-[0.8rem] flex items-center justify-center">
|
||||||
|
<div className="absolute w-[calc(100%-2px)] h-[calc(100%-2px)] top-[0.08rem] bg-linear-270 from-[#2567EC] to-[#37B6F7] z-50 rounded-[0.8rem]"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</button>
|
||||||
</button>
|
<Dialog open={isExportDialogOpen} onOpenChange={setIsExportDialogOpen}>
|
||||||
|
<DialogContent className="p-6">
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle>Export Project</DialogTitle>
|
||||||
|
</DialogHeader>
|
||||||
|
<div>
|
||||||
|
<p className="text-muted-foreground">
|
||||||
|
Export functionality is not ready yet. We're currently working on
|
||||||
|
a custom pipeline to make this possible.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user