+
+
+
+ {(selectedFiles === 'all' ||
+ (selectedFiles as Set).size > 0) && (
+ <>
+ }
+ >
+ 删除选中项 (
+ {selectedFiles === 'all'
+ ? files.length
+ : (selectedFiles as Set).size}
+ )
+
+
+ >
+ )}
+
+ {currentPath.split('/').map((part, index, parts) => (
+ {
+ const newPath = parts.slice(0, index + 1).join('/')
+ navigate(`/file_manager#${encodeURIComponent(newPath)}`)
+ }}
+ >
+ {part}
+
+ ))}
+
+
+
+
+
+
+ 名称
+
+
+ 类型
+
+
+ 大小
+
+
+ 修改时间
+
+ 操作
+
+
+
+
+ }
+ items={files}
+ >
+ {(file) => (
+
+
+
+
+ {file.isDirectory ? '目录' : '文件'}
+
+ {isNaN(file.size) || file.isDirectory
+ ? '-'
+ : `${file.size} 字节`}
+
+ {new Date(file.mtime).toLocaleString()}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )}
+
+
+
+ {/* 文件编辑对话框 */}
+
setEditingFile(null)}
+ >
+
+
+ 编辑文件
+ {editingFile?.path}
+
+
+
+
+ setEditingFile((prev) =>
+ prev ? { ...prev, content: value || '' } : null
+ )
+ }
+ options={{ wordWrap: 'on' }}
+ />
+
+
+
+
+
+
+
+
+
+ {/* 新建文件/目录对话框 */}
+
setIsCreateModalOpen(false)}
+ >
+
+ 新建
+
+
+
+
+
+
+ setNewFileName(e.target.value)}
+ />
+
+
+
+
+
+
+
+
+
+ {/* 重命名对话框 */}
+
setIsRenameModalOpen(false)}
+ >
+
+ 重命名
+
+ setNewFileName(e.target.value)}
+ />
+
+
+
+
+
+
+
+
+ {/* 移动对话框 */}
+
setIsMoveModalOpen(false)}>
+
+ 移动到
+
+
+
setMoveTargetPath(e.target.value)}
+ placeholder="请输入完整目标路径"
+ />
+
+ 当前选择:
+ {selectedFiles === 'all' ||
+ (selectedFiles as Set).size > 0
+ ? `${selectedFiles === 'all' ? files.length : (selectedFiles as Set).size} 个项目`
+ : renamingFile}
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/napcat.webui/src/pages/index.tsx b/napcat.webui/src/pages/index.tsx
index 62e53fd5..8a94ec5a 100644
--- a/napcat.webui/src/pages/index.tsx
+++ b/napcat.webui/src/pages/index.tsx
@@ -1,8 +1,6 @@
import { AnimatePresence, motion } from 'motion/react'
import { Route, Routes, useLocation } from 'react-router-dom'
-import UnderConstruction from '@/components/under_construction'
-
import DefaultLayout from '@/layouts/default'
import DashboardIndexPage from './dashboard'
@@ -11,6 +9,7 @@ import ConfigPage from './dashboard/config'
import DebugPage from './dashboard/debug'
import HttpDebug from './dashboard/debug/http'
import WSDebug from './dashboard/debug/websocket'
+import FileManagerPage from './dashboard/file_manager'
import LogsPage from './dashboard/logs'
import NetworkPage from './dashboard/network'
import TerminalPage from './dashboard/terminal'
@@ -36,7 +35,7 @@ export default function IndexPage() {