Commit Graph

23 Commits

Author SHA1 Message Date
david_bai 307232bd15 fix:Attempt to fix the issue of asynchronous exit room status in the receiver 2025-08-14 23:02:33 +08:00
david_bai 7038e79726 fix:Change the behavior of reloading the webpage when the receiver exits the room to a more elegant approach 2025-08-13 22:53:49 +08:00
david_bai 12cda8c030 fea:Add an elegant exit room feature for the recipient 2025-08-10 23:16:59 +08:00
david_bai 245c4efcd0 fix(blog url bug): fix blog url bug
Fixed the bug of redundant language suffix in blog URLs, added lang to the blog homepage link to prevent language switching issues.
2025-08-02 23:27:02 +08:00
david_bai 34d1897093 Fix the issue where the sender and receiver (without requesting existing files) have inconsistent states in resumeable file transfer with broken connections 2025-07-21 23:06:32 +08:00
david_bai 27cb5c3be8 Fix transfer status in resume state 2025-07-21 00:02:51 +08:00
david_bai 9ce63992b7 Fix the problem of resuming downloads when the webpage is closed or the network is disconnected. Further testing is needed. 2025-07-19 00:24:44 +08:00
david_bai 522f567fb4 feat(transfer): implement resumable file uploads
This commit introduces support for resumable file transfers when using the 'Save to Directory' feature.

Key changes:
- The WebRTC protocol is updated to include an 'offset' in the 'fileRequest' message.
- 'FileReceiver' now checks for partially downloaded files in the selected directory. If a partial file is found, it requests to resume the transfer from the offset of the existing file size. It uses '{ keepExistingData: true }' to append to the file.
- 'FileSender' now handles requests with an 'offset' and uses 'file.slice(offset)' to send only the remaining data.
- Progress calculation is adjusted to reflect the resumed download state.

This provides a more robust user experience for large file transfers, allowing recovery from interruptions like network loss or accidental tab closure.
2025-07-16 22:50:55 +08:00
david_bai 8ea2016218 fix(receiver): Prevent duplicate downloads on directory save
When saving files to a user-selected directory, the browser would trigger an additional, redundant download.

This was caused by a race condition where the UI checked the file's save method (saveType) before the flag was updated upon completion. The decision to save to disk was made too late in the process.

This commit resolves the issue by setting the saveType at the beginning of the file request. This ensures the UI has the correct information when the transfer finishes, preventing the extra download.
2025-07-15 23:13:59 +08:00
david_bai 6e90a78a4b Responsive drag and drop of files using FullScreenDropZone Component 2025-07-02 23:53:22 +08:00
david_bai f09452ac2a reformat all ts code via prettier 2025-06-22 21:34:54 +08:00
david_bai e62a8f9573 translate frontend/hooks & frontend/lib 2025-06-22 10:05:00 +08:00
david_bai 445ab2ef04 优化,初步ok 2025-06-10 23:25:59 +08:00
david_bai cabb943103 微调,待测试 2025-06-09 23:10:16 +08:00
david_bai 341a392c20 重构了,待测试 2025-06-09 21:32:43 +08:00
david_bai 75901898a1 加入日志 2025-06-08 19:42:30 +08:00
david_bai 60f42eb548 修改BaseWebRTC 的配置注入 2025-06-07 19:17:52 +08:00
david_bai 27ed495571 移动文件 2025-06-07 16:10:45 +08:00
david_bai 7d2983951b 做了一点微调 2025-06-07 12:20:55 +08:00
david_bai df04f37730 更新导入;自动格式化 2025-06-03 22:37:05 +08:00
david_bai 517a40933f 拆分出来 2025-06-03 22:36:12 +08:00
david_bai 2c09750282 自动格式调整 2025-05-26 23:21:53 +08:00
david_bai 4d3eb551c7 前端备份 2025-05-23 22:41:56 +08:00