Phase 2.7完成:文件浏览模块完善(SQLite查询 + Tree展示)
Some checks failed
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled

Phase 2.7.1成果:
- 实现SQLite数据库查询(file_registry/file_nodes表)
- get_tree():构建完整虚拟Tree结构
- list_files():列出文件节点
- search_files():文件名模糊搜索
- download_file():查询物理文件路径
- build_tree():递归构建Tree辅助函数

Phase 2.7.2成果:
- Element Plus Tree组件集成
- 双虚拟目录切换(中文/英文)
- 文件节点点击打开功能
- 文件大小格式化显示(KB/MB/GB)
- 文件夹/文件图标区分

技术实现:
- 添加rusqlite依赖到Cargo.toml
- 修复Tauri features配置
- Home.vue完整Tree展示UI
- 编译成功(8警告,0错误)

状态:Phase 2总进度98%完成
This commit is contained in:
Warren
2026-06-13 15:53:21 +08:00
parent 8314c26fb6
commit d7afd109b0
4 changed files with 269 additions and 42 deletions

View File

@@ -637,15 +637,6 @@ dependencies = [
"subtle",
]
[[package]]
name = "dirs"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-next"
version = "2.0.0"
@@ -656,18 +647,6 @@ dependencies = [
"dirs-sys-next",
]
[[package]]
name = "dirs-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.48.0",
]
[[package]]
name = "dirs-sys-next"
version = "0.1.2"
@@ -800,6 +779,18 @@ version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
[[package]]
name = "fallible-iterator"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
[[package]]
name = "fallible-streaming-iterator"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
[[package]]
name = "fastrand"
version = "2.4.1"
@@ -1993,7 +1984,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"chrono",
"dirs",
"rusqlite",
"serde",
"serde_json",
"sqlx",
@@ -2336,12 +2327,6 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "os_pipe"
version = "1.2.3"
@@ -2992,6 +2977,20 @@ dependencies = [
"zeroize",
]
[[package]]
name = "rusqlite"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d"
dependencies = [
"bitflags 2.13.0",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
"libsqlite3-sys",
"smallvec",
]
[[package]]
name = "rustc_version"
version = "0.4.1"