From b02f23729bc0133841c05bf966011a62c0b1fdfd Mon Sep 17 00:00:00 2001 From: MikiVL Date: Sun, 26 Jul 2026 09:02:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=94=E8=AE=B0=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E5=A4=9A=E4=B8=AA=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除管理员面板入口(UserMenu 中的按钮和相关 import) - 修复重复文件夹问题:seed 判断同时检查 notes 和 folders 数量 - 文件夹新增 hover 删除按钮,附带确认弹窗 - 文件夹区域添加 overflow-y-auto 和 maxHeight 限制,防止过多文件夹遮挡笔记列表 Co-Authored-By: Claude Sonnet 4.6 --- src/components/auth/UserMenu.tsx | 1 + src/components/sidebar/Sidebar.tsx | 59 +++++++++++++++++++++++++++--- src/db/index.ts | 8 +++- 3 files changed, 61 insertions(+), 7 deletions(-) diff --git a/src/components/auth/UserMenu.tsx b/src/components/auth/UserMenu.tsx index 09805ab..608d1f1 100644 --- a/src/components/auth/UserMenu.tsx +++ b/src/components/auth/UserMenu.tsx @@ -76,6 +76,7 @@ export function UserMenu() { 输入邀请码开启云存储 )} + {showProfile && setShowProfile(false)} />} diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx index a081172..d3126e4 100644 --- a/src/components/sidebar/Sidebar.tsx +++ b/src/components/sidebar/Sidebar.tsx @@ -48,6 +48,7 @@ export function Sidebar() { } | null>(null) const [draggingNoteId, setDraggingNoteId] = useState(null) const [deleteConfirm, setDeleteConfirm] = useState(null) + const [deleteFolderConfirm, setDeleteFolderConfirm] = useState(null) const sensors = useSensors( useSensor(MouseSensor, { activationConstraint: { distance: 6 } }), @@ -178,6 +179,7 @@ export function Sidebar() { if (e.key === 'Enter') handleRenameFolder(folder.id) if (e.key === 'Escape') setEditingFolderId(null) }} + onDelete={() => setDeleteFolderConfirm(folder.id)} /> {expandedFolders.has(folder.id) && renderFolder(folder.id, depth + 1)} @@ -211,7 +213,7 @@ export function Sidebar() { {/* Search */} -
+
{/* Nav shortcuts */} -