Add plugin GitHubProxy v1.0.1#164
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the githubproxy plugin for ZTools, a Vue 3 based tool for GitHub file proxy acceleration, command generation, and file downloading. Feedback identifies a bug in the proxy editing logic where renaming a server breaks the update process, and suggests optimizing the speed test feature through parallel execution. Further recommendations include refining download progress estimation for files with unknown sizes and adopting a more robust database update pattern to avoid data loss during configuration changes.
| const saveEdit = () => { | ||
| if (!editingServer.value) return | ||
|
|
||
| const index = proxyServers.value.findIndex(s => s.name === editingServer.value?.name) |
Comment on lines
+98
to
+100
| for (const server of proxyServers.value) { | ||
| await testServer(server) | ||
| } |
| // 没有content-length头,显示动态进度 | ||
| // 根据下载字节数估算进度,确保进度会变化 | ||
| const estimatedProgress = Math.min(99, Math.round((downloadedSize / (1024 * 1024)) * 10)); | ||
| onProgress(estimatedProgress); |
Comment on lines
+58
to
+59
| await window.ztools.db.remove('proxyServers') | ||
| await window.ztools.db.put({ _id: 'proxyServers', data: JSON.stringify(proxyServers.value)}) |
Contributor
Author
There was a problem hiding this comment.
单独使用db.put 数据未更新
- GitHub 文件代理加速工具 V1.0.0 - fix: 修复拼写错误并添加重定向处理 - fix(下载进度): 优化无content-length时的进度显示逻辑
- GitHub 文件代理加速工具 V1.0.0 - fix: 修复拼写错误并添加重定向处理 - fix(下载进度): 优化无content-length时的进度显示逻辑 - chore: 更新插件版本号至1.0.3
- GitHub 文件代理加速工具 V1.0.0 - fix: 修复拼写错误并添加重定向处理 - fix(下载进度): 优化无content-length时的进度显示逻辑 - chore: 更新插件版本号至1.0.3 - feat: add github proxy url copy function and update about page link
Contributor
Author
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.



插件信息
本次变更
Changed
截图 / 演示
自检清单
plugins/githubproxy/目录此 PR 由 ztools-plugin-cli 自动管理:每次
ztools publish在分支上追加一个 commit,PR 链接保持不变。