fix(FontManager): 修复了一些问题 by MoYingJi · Pull Request #814 · imsyy/SPlayer

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

  • 修复字体删除问题: 解决了在多字体备选模式下,最后一个字体无法完全删除的错误。
  • 优化字体选项排序: 对字体选项进行了预先排序,以改善用户在选择字体时的体验,避免常用字体被其他变体遮挡。
  • 引入字体处理工具函数: 抽象了字体家族字符串与数组之间的转换逻辑,提高了代码的可读性和可维护性。
Changelog
  • src/components/Modal/Setting/FontManager.vue
    • 将字体家族字符串与数组之间的转换逻辑封装到 fontFamilyToArrayfontArrayToFamily 两个新函数中,并在 n-select 组件的 valueon-update-value 属性中应用。
    • 为系统字体列表 systemFonts 添加了自定义排序逻辑,以确保在多字体选择器中,短的、更通用的字体名称(如 "Noto Sans")能够优先显示,从而优化用户搜索和选择体验。
    • 新增了 fontFamilyToArray 函数,用于将逗号分隔的字体家族字符串转换为去除了空白和空字符串的数组。
    • 新增了 fontArrayToFamily 函数,用于将字体数组重新组合成逗号加空格分隔的字体家族字符串。
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.