Draft
Conversation
4b54b87 to
b439cd4
Compare
This was referenced Jan 24, 2026
Open
…ts/files) This commit introduces a new feature allowing users to selectively restore data from backups. - Added `RestoreOptions` and `RestoreAction` (Merge, Overwrite, Ignore) to `lib/core/models/backup.dart`. - Updated `DataSync` service to handle granular restoration for Settings, Providers, Chats, and Files. - Preserved legacy "Full Overwrite" logic for robust compatibility. - Implemented `RestoreOptionsDialog` (inline) in both Mobile and Desktop backup pages for fine-grained control. - Updated English/Chinese localizations for restore actions.
b439cd4 to
ace8797
Compare
Open
Contributor
Author
|
TODO:审计所有备份项的表现。比如快捷键设置应该是系统特异的。#312 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feat: 支持颗粒化备份恢复 (设置/供应商/聊天/文件)
描述
此 PR 引入了颗粒化备份恢复功能,允许用户针对不同类别的数据(设置、供应商、聊天记录、文件)单独选择恢复策略。解决了不同设备间(如手机与电脑)同步数据时,因屏幕缩放等设备特有设置被覆盖而导致体验不一致的问题。
主要变更
1. 数据模型与逻辑
lib/core/models/backup.dart中新增恢复选项模型,支持三种操作:Merge(智能合并):保留本地现有配置,仅添加缺失项(推荐)。Overwrite(覆盖):完全使用备份数据覆盖本地数据。Ignore(忽略):跳过该类别的恢复。lib/core/services/backup/data_sync.dart,实现了基于上述选项的颗粒化恢复逻辑。Zoom等设备设置可被保留。2. 用户界面
BackupPage) 和桌面端 (DesktopBackupPane) 实现了新的内联恢复选项弹窗。测试与验证