✨ feat: 更新进度展示优化 by imsyy · Pull Request #870 · imsyy/SPlayer

Summary of Changes

Hello @imsyy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在优化应用程序的更新流程和用户体验。通过将更新的下载和安装步骤解耦,并引入全局状态管理来跟踪更新进度,用户现在可以更直观地了解更新状态,并在下载完成后选择手动安装。这不仅提升了用户对更新过程的控制感,也使得更新提示和交互更加友好和清晰。

Highlights

  • 更新流程优化: 将更新下载和安装分离,用户现在可以手动触发安装,而非自动安装。
  • 全局更新状态管理: 引入 Pinia 状态管理,统一管理应用更新的可用性、下载进度和状态。
  • 导航栏更新提示: 在导航栏中添加了新的更新按钮,根据更新状态(有新版本、下载中、已下载)动态显示提示和进度。
  • 更新弹窗改进: 更新弹窗现在能更清晰地展示下载进度,并在下载完成后提供“立即安装”选项。
Changelog
  • electron/main/ipc/ipc-update.ts
    • 引入并处理了新的 installUpdate IPC 事件。
  • electron/main/update/index.ts
    • quitAndInstall 逻辑封装到独立的 installUpdate 函数中,不再自动安装更新。
  • src/components/Layout/Nav.vue
    • 添加了动态更新按钮和相关逻辑,以在导航栏显示更新状态。
  • src/components/List/CommentList.vue
    • 调整了评论列表项的背景颜色样式。
  • src/components/Modal/UpdateApp.vue
    • 重构了更新弹窗,以利用全局状态管理显示下载进度和安装选项。
  • src/stores/status.ts
    • 扩展了状态存储,新增了多个用于跟踪更新状态的属性。
  • src/utils/initIpc.ts
    • 集中处理了 Electron IPC 更新事件,并根据事件更新全局状态存储。
Activity
  • 此拉取请求没有提供任何人工活动(评论、审查)。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.