( folderId: string, targetFolderId: string | undefined )
| 191 | |
| 192 | // 检查文件夹在目标文件夹是否重名 |
| 193 | export function checkFolderNameConflict( |
| 194 | folderId: string, |
| 195 | targetFolderId: string | undefined |
| 196 | ): string | null { |
| 197 | const { folder } = stores |
| 198 | const movingFolder = folder.getById(folderId) |
| 199 | if (!movingFolder) return null |
| 200 | |
| 201 | const siblingFolders = folder.findByParentId(targetFolderId) |
| 202 | const conflict = siblingFolders.find((f) => f.id !== folderId && f.name === movingFolder.name) |
| 203 | return conflict ? movingFolder.name : null |
| 204 | } |
| 205 | |
| 206 | // 移动页面到文件夹(带重名检查) |
| 207 | export async function movePage( |
nothing calls this directly
no test coverage detected