使用openai对UI进行了重构

This commit is contained in:
2026-02-24 11:50:51 +08:00
parent 0c97f02e51
commit 317b9c7c26
15 changed files with 695 additions and 583 deletions
+6 -6
View File
@@ -120,9 +120,9 @@ function TreeNode({
</button>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content className="min-w-[120px] bg-popover text-popover-foreground rounded-md border shadow-md p-1 z-50 animate-in fade-in zoom-in-95" align="start">
<DropdownMenu.Content className="ui-card z-50 min-w-[160px] p-1.5 shadow-xl animate-in fade-in zoom-in-95" align="start" sideOffset={6}>
<DropdownMenu.Item
className="flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent cursor-pointer outline-none"
className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent"
onClick={(e) => {
e.stopPropagation();
const targetParentId = node.type === "folder" ? node.id : node.parentId;
@@ -135,7 +135,7 @@ function TreeNode({
<span></span>
</DropdownMenu.Item>
<DropdownMenu.Item
className="flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent cursor-pointer outline-none"
className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent"
onClick={(e) => {
e.stopPropagation();
const targetParentId = node.type === "folder" ? node.id : node.parentId;
@@ -148,7 +148,7 @@ function TreeNode({
<span></span>
</DropdownMenu.Item>
<DropdownMenu.Item
className="flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent cursor-pointer outline-none"
className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent"
onClick={(e) => {
e.stopPropagation();
const targetParentId = node.type === "folder" ? node.id : node.parentId;
@@ -160,7 +160,7 @@ function TreeNode({
<span>...</span>
</DropdownMenu.Item>
<DropdownMenu.Item
className="flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent cursor-pointer outline-none"
className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent"
onClick={(e) => {
e.stopPropagation();
if (node.type === "folder") {
@@ -175,7 +175,7 @@ function TreeNode({
</DropdownMenu.Item>
<DropdownMenu.Separator className="h-px bg-muted my-1" />
<DropdownMenu.Item
className="flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-red-50 text-red-600 cursor-pointer outline-none"
className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm text-destructive outline-none transition-colors hover:bg-destructive/10"
onClick={async (e) => {
e.stopPropagation();
const ok = await confirm({