-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: 添加 WebDAV 聊天记录同步功能 #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Hronrad
wants to merge
16
commits into
Dooy:main
Choose a base branch
from
Hronrad:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+491
−1
Conversation
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
Hronrad
commented
Nov 3, 2025
- 新增 WebDAV 工具模块 (src/utils/webdav.ts)
- 添加 Vercel Serverless 代理函数 (api/webdav-proxy.js) 解决 CORS 跨域问题
- 在设置页面添加 WebDAV 配置界面和上传/下载按钮
- 支持上传本地聊天记录到云端
- 支持从云端下载聊天记录到本地
- 添加测试连接功能验证配置正确性
- 兼容坚果云、Nextcloud 等 WebDAV 服务
- 添加中文界面文本支持
- 新增 WebDAV 工具模块 (src/utils/webdav.ts) - 在设置页面添加同步按钮和配置界面 - 支持一键上传/下载聊天记录到 WebDAV 服务器 - 添加中文界面文本
- 使用 XMLHttpRequest 替代 fetch 以更好地处理跨域请求 - 添加详细的错误提示信息 - 新增测试连接功能,帮助用户诊断配置问题 - 优化同步逻辑,支持双向同步 - 添加 30 秒超时设置 - 改进用户体验,添加加载提示
- 创建 /api/webdav-proxy 端点用于代理 WebDAV 请求 - 解决浏览器 CORS 跨域限制问题 - 支持 GET、PUT、PROPFIND 等 WebDAV 方法 - 兼容 Vercel 部署环境
- 使用原生 http/https 模块替代 axios(避免依赖问题) - 添加 CORS 头支持跨域请求 - 使用 writeHead 和 end 方法符合 Vercel 规范 - 改进错误处理和超时控制
- 添加智能同步:自动比较本地和云端数据,使用最新的 - 修复导入后同步被覆盖的问题 - 新增独立的上传和下载按钮,提供更精确的控制 - 按数据量(聊天记录数、消息数)智能判断使用哪个版本 - 记录同步时间戳 - 改进用户提示信息 按钮说明: - 同步:智能比较,自动选择最新数据 - 上传:强制上传本地数据到云端 - 下载:强制下载云端数据到本地
- 删除模糊的「同步」按钮 - 保留明确的「上传到云端」和「从云端下载」按钮 - 用户可以完全控制数据流向 - 上传:强制将本地数据上传到 WebDAV - 下载:强制从 WebDAV 下载数据到本地(会覆盖)
|
@Hronrad is attempting to deploy a commit to the dooy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
- 为所有 8 种语言添加 WebDAV 相关翻译 - 包括中文简体、中文繁体、英语、法语、韩语、俄语、土耳其语、越南语 - 翻译涵盖:配置、URL、用户名、密码、上传、下载、测试连接等功能
Author
|
@Dooy 已整合最新分支代码并简化逻辑,希望可以合并。如若不能,希望回复原因。😊 |
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.
