主要合入内容:

- 文件管理器分页加载、排序偏好、桌面表头排序、移动端排序菜单、Ctrl/Cmd+F搜索、Esc 关闭搜索、鼠标右滑返回上级。
- 移动端同步状态页、同步统计卡片、同步任务/累计统计事件、同步页布局更新。
- Android 相册同步默认路径改为 DCIM/Camera,下载路径改用 external_path。
- Rust sync-core 更新:Android 日志依赖、AlbumUpload/AlbumDownload、MirrorWcf 统计修复、Linux FUSE镜像挂载与读写同步支持。

- 依赖更新:external_path、fl_chart、pdfrx 升级,并修了 pdfrx 新版本的deprecated API。
- 新增文件包括:sort_options.dart、sync_page_android.dart、sync_stats_card.dart、platform/fuse.rs、sync_engine/fuse.rs。
This commit is contained in:
2026-06-04 07:11:43 +08:00
parent 5ee6ba1e28
commit b02daf1448
56 changed files with 7589 additions and 1200 deletions
+27 -4
View File
@@ -81,11 +81,13 @@ class StorageService {
/// 设置
Future<String?> get themeMode => getString(StorageKeys.themeMode);
Future<bool> setThemeMode(String value) => setString(StorageKeys.themeMode, value);
Future<bool> setThemeMode(String value) =>
setString(StorageKeys.themeMode, value);
/// 服务器地址配置
Future<String?> get customBaseUrl => getString(StorageKeys.customBaseUrl);
Future<bool> setCustomBaseUrl(String? value) => setString(StorageKeys.customBaseUrl, value);
Future<bool> setCustomBaseUrl(String? value) =>
setString(StorageKeys.customBaseUrl, value);
Future<bool> removeCustomBaseUrl() => remove(StorageKeys.customBaseUrl);
/// 服务器列表
@@ -115,8 +117,10 @@ class StorageService {
}
/// 上次选中的服务器 label
Future<String?> get lastSelectedServerLabel => getString(StorageKeys.lastSelectedServer);
Future<bool> setLastSelectedServerLabel(String? value) => setString(StorageKeys.lastSelectedServer, value);
Future<String?> get lastSelectedServerLabel =>
getString(StorageKeys.lastSelectedServer);
Future<bool> setLastSelectedServerLabel(String? value) =>
setString(StorageKeys.lastSelectedServer, value);
/// 搜索历史(最新在前,最多 20 条)
Future<List<String>> getSearchHistory() async {
@@ -188,6 +192,25 @@ class StorageService {
Future<void> clearSyncData() async {
await remove(StorageKeys.syncConfig);
await remove(StorageKeys.syncState);
await remove(StorageKeys.syncCumStats);
}
/// 保存同步累积统计
Future<bool> setSyncCumStats(Map<String, int> stats) async {
final json = jsonEncode(stats);
return await setString(StorageKeys.syncCumStats, json);
}
/// 读取同步累积统计
Future<Map<String, int>?> getSyncCumStats() async {
final json = await getString(StorageKeys.syncCumStats);
if (json == null) return null;
try {
final map = jsonDecode(json) as Map<String, dynamic>;
return map.map((k, v) => MapEntry(k, v as int));
} catch (_) {
return null;
}
}
// ===== client_id 持久化 =====