Skip to content

fix(website): 临时修复些小问题和不太顺眼的地方#658

Merged
imsyy merged 2 commits into
SPlayer-Dev:devfrom
MoYingJi:fix/website
Dec 25, 2025
Merged

fix(website): 临时修复些小问题和不太顺眼的地方#658
imsyy merged 2 commits into
SPlayer-Dev:devfrom
MoYingJi:fix/website

Conversation

@MoYingJi
Copy link
Copy Markdown
Collaborator

小问题

  • 修复 x86_64 被误判为 x86
  • 修复 .AppImage 大小写问题

不太顺眼

  • 在「您的设备应该是」和 platformName 之间增加空格
  • 颠倒了 Linux 安装包展示的 titledesc

- 在「您的设备应该是」和 `platformName` 之间增加空格
- 修复 `x86_64` 被误判为 `x86`
- 修复 `.AppImage` 大小写问题
因为我觉得这么做更合适,title 处应该写明**这是什么**而不是哪些系统能安装
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @MoYingJi, 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

  • 架构识别修复: 修正了 x86_64 架构在下载页面被错误识别为 x86 的问题,确保了架构判断的准确性。
  • AppImage 大小写兼容: 修复了 .AppImage 文件名大小写不敏感的问题,提高了文件匹配的鲁棒性。
  • UI 文本优化: 在下载页面的设备信息显示中,'您的设备应该是' 和实际平台名称之间增加了视觉间隔,提升了可读性。
  • Linux 包显示调整: 调整了 Linux 安装包(如 AppImage, Debian, RPM, Pacman)在下载页面上的标题和描述的显示顺序,使其更符合预期。
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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

您好,感谢您的贡献!这次的 PR 修复了几个重要的小问题,特别是 x86_64 架构的识别错误和 .AppImage 的大小写问题,并优化了一些显示细节,提升了用户体验。

代码的修改方向是正确的。我主要有两个建议:

  1. 为了提高代码的健壮性,建议对 .AppImage 文件后缀的检查改为不区分大小写的方式。
  2. 为了提升代码的可维护性,建议将多处重复的架构检测逻辑(如 x64, ARM64 等)提取为独立的辅助函数。

具体的修改建议请见我的评论。总体来说,这是一次很棒的修复和优化!

const n = name.toLowerCase();
const isArmAsset = n.includes("arm64") || n.includes("aarch64");
const is32BitAsset = n.includes("ia32") || n.includes("x86");
const is32BitAsset = n.includes("ia32") || (n.includes("x86") && !n.includes("x86_64"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

这个架构检查逻辑修复了 x86_64 被错误识别为32位的问题,做得很好。不过,我注意到类似的架构检测逻辑(如 ARM64、x64)散布在 getArchDisplaysortAssetsisArchCompatible 等多个函数中。

为了提高代码的可维护性并避免重复,可以考虑将这些检测逻辑提取为独立的辅助函数,例如 isArmAsset, isX64Asset, is32BitAsset。这样可以让代码更清晰,也更容易在未来进行修改。

} else if (p === "linux") {
const appImage = assets.find(
(f) => f.name.toLowerCase().endsWith(".appimage") && isArchCompatible(f.name, arch),
(f) => f.name.endsWith(".AppImage") && isArchCompatible(f.name, arch),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

使用 endsWith('.AppImage') 会进行区分大小写的比较。虽然目前发布的文件名可能是固定的,但为了增加代码的健壮性,建议使用不区分大小写的匹配方式,以防未来文件名大小写发生变化。

可以考虑使用正则表达式,这与文件中其他地方(如369行)的做法一致。

      (f) => /\.appimage$/i.test(f.name) && isArchCompatible(f.name, arch),

assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".appimage"))),
title: "AppImage",
desc: "通用运行包",
assets: sortAssets(rawAssets.filter((f) => f.name.endsWith(".AppImage"))),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

同样,这里也建议使用不区分大小写的匹配方式来查找 .AppImage 文件,以提高代码的健壮性。

          assets: sortAssets(rawAssets.filter((f) => /\.appimage$/i.test(f.name))),

@imsyy imsyy merged commit bd2977e into SPlayer-Dev:dev Dec 25, 2025
@MoYingJi MoYingJi deleted the fix/website branch December 25, 2025 04:26
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.

2 participants