隐藏无限画布侧栏添加视频按钮
This commit is contained in:
parent
05653f12f6
commit
1e07c6ae26
@ -14,7 +14,6 @@ import {
|
|||||||
Hand,
|
Hand,
|
||||||
Plus,
|
Plus,
|
||||||
ImagePlus,
|
ImagePlus,
|
||||||
Video,
|
|
||||||
Type,
|
Type,
|
||||||
Loader2,
|
Loader2,
|
||||||
Scissors,
|
Scissors,
|
||||||
@ -291,21 +290,6 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 添加视频节点
|
|
||||||
const handleAddVideoNode = () => {
|
|
||||||
addNode({
|
|
||||||
type: 'video',
|
|
||||||
position: { x: 100 + Math.random() * 200, y: 100 + Math.random() * 200 },
|
|
||||||
size: { width: 400, height: 300 },
|
|
||||||
data: {
|
|
||||||
src: '',
|
|
||||||
status: 'pending',
|
|
||||||
prompt: '',
|
|
||||||
},
|
|
||||||
connections: [],
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 处理图片操作(通过事件分发到选中图片节点执行)
|
// 处理图片操作(通过事件分发到选中图片节点执行)
|
||||||
const handleAction = (action: string) => {
|
const handleAction = (action: string) => {
|
||||||
if (!selectedImageNode) {
|
if (!selectedImageNode) {
|
||||||
@ -606,7 +590,7 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
|||||||
{/* 5. Floating Bottom Toolbar (Left) */}
|
{/* 5. Floating Bottom Toolbar (Left) */}
|
||||||
<div className="absolute left-4 top-1/2 -translate-y-1/2 z-20">
|
<div className="absolute left-4 top-1/2 -translate-y-1/2 z-20">
|
||||||
<div className="flex flex-col items-center gap-2 p-1.5 rounded-2xl border bg-background/80 backdrop-blur-md shadow-2xl">
|
<div className="flex flex-col items-center gap-2 p-1.5 rounded-2xl border bg-background/80 backdrop-blur-md shadow-2xl">
|
||||||
{/* Tools: Select, Pan, Add Text, Add Image, Add Video */}
|
{/* Tools: Select, Pan, Add Text, Add Image */}
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
@ -727,15 +711,6 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
|||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent side="right">添加图片</TooltipContent>
|
<TooltipContent side="right">添加图片</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<Button variant="ghost" size="icon" onClick={handleAddVideoNode} className="rounded-xl h-9 w-9">
|
|
||||||
<Video className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent side="right">添加视频</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user