Skip to content
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

docs: update docs #114

Merged
merged 1 commit into from
Mar 27, 2023
Merged

docs: update docs #114

merged 1 commit into from
Mar 27, 2023

Conversation

ayangweb
Copy link
Member

No description provided.

@ayangweb ayangweb merged commit 9300bc6 into master Mar 27, 2023
- **Linux**: x64
- **Mac**: [Apple Silicon](https://github.com/ChatGPT-Desktop/ChatGPT-Desktop/releases/download/v0.0.8/ChatGPT-Desktop_0.0.8_aarch64.dmg) 或者 [Intel](https://github.com/ChatGPT-Desktop/ChatGPT-Desktop/releases/download/v0.0.8/ChatGPT-Desktop_0.0.8_x64.dmg)
- **Windows**: [全平台](https://github.com/ChatGPT-Desktop/ChatGPT-Desktop/releases/download/v0.0.8/ChatGPT-Desktop_0.0.8_x64_zh-CN.msi)
- **Linux**: [全平台](https://github.com/ChatGPT-Desktop/ChatGPT-Desktop/releases/download/v0.0.8/chat-gpt-desktop_0.0.8_amd64.deb)

<img src='./images/theme.gif' />
<img src='./images/home.png' />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码是一个基于 tauri + vue3 开发的跨平台桌面端应用的简介页面,主要做了以下几个修改:

  1. 将下载链接更改为直接下载最新版本;
  2. 将支持的平台与架构改为具体的下载链接;
  3. 增加了一些图片。

从代码上看,没有明显的 bug,但可以考虑以下改进:

  1. 可以在下载链接中增加版本号和文件大小等信息,方便用户选择合适的版本;
  2. 可以将每个平台与架构的下载链接分别列出,便于不同用户下载。

@@ -17,4 +30,5 @@ const updateCargoVersion = () => {
}
}

updateReadmeVersion()
updateCargoVersion()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码的作用是更新项目中的版本号。

代码看起来没什么问题。但有以下几点建议:

  • 在读取文件和写入文件时,最好加上错误处理,以免出现错误而导致程序崩溃。
  • 如果代码需要在多个地方被使用,最好封装成一个可复用的函数或模块。这样可以使代码更易维护和重用。
  • 函数名 updateReadmeVersionupdateCargoVersion 虽然能反映出函数的作用,但命名不够清晰。它们应该更具体地描述它们要做的工作。

@@ -70,7 +70,7 @@
"active": true,
"dialog": false,
"endpoints": [
"https://updater-two.vercel.app/update/{{target}}/{{current_version}}"
"https://download.ayangweb.cn/update/{{target}}/{{current_version}}"
],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDhDRkYzMDc2NTFGRTQ5MTIKUldRU1NmNVJkakQvaklIVnpidTB5TVBwUXlFOTI1WkJwS0h4YTJScEdxQ0lzRkFnQUhDQ3pnM28K"
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码的变更是将"endpoints"字段从"https://updater-two.vercel.app/update/{{target}}/{{current_version}}"替换成了"https://download.ayangweb.cn/update/{{target}}/{{current_version}}"

这个变更看起来没有明显的错误风险。建议在做类似替换时,先确认新的URL是否能够正常工作,并且考虑使用HTTPS协议以确保通信安全。

如果必要的话,可以通过增加单元测试或集成测试来进一步确保修改不会引入新问题。

@ayangweb ayangweb deleted the dev_ayang branch March 27, 2023 13:49
ayangweb added a commit that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant