Skip to content

Conversation

@MoYingJi
Copy link
Collaborator

具体可以看每一个 Commit

把两个模态框改为了相近的形式,名称也统一了
我说这里怎么回事呢,有个遗漏代码?
@gemini-code-assist
Copy link
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!

此拉取请求对应用程序的设置进行了重要的重构,主要集中在评论和歌词排除功能上。这些更改旨在通过提供更直观、更有组织的界面来配置这些功能,从而增强用户体验,同时通过标准化命名约定和整合组件来提高代码可维护性。此外,它还为各种设置项引入了有用的提示信息,并确保某些功能正确地限定在Electron环境中。

Highlights

  • 评论排除设置重构: 将评论排除功能重构为一个独立的、更具组织性的模态框(ExcludeComment.vue),提供了关键词和正则表达式过滤的独立选项卡,并优化了清空、导入和导出功能。
  • 歌词排除设置增强: 增强了歌词排除设置,新增了“排除选项”选项卡以提供更细致的控制(如TTML和本地歌词排除开关),并将所有歌词排除配置整合到一个统一的模态框(ExcludeLyrics.vue)中。
  • 设置项提示信息(Tooltip): 为设置项引入了新的 title 属性,当鼠标悬停在设置控件上时,将显示详细的提示信息,提升用户体验。
  • 字段名标准化与迁移: 标准化了歌词排除相关设置字段的命名(例如,excludeUserKeywords 更名为 excludeLyricsUserKeywords),并更新了设置Schema版本至8,包含了相应的迁移逻辑以确保数据兼容性。
  • Electron环境特定功能优化: 明确了“音乐解锁”功能和MPV播放引擎选项仅在Electron环境下可用,并在非Electron环境中提供了相应的禁用状态和提示信息。
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
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

这次的 Pull Request 主要对设置功能进行了重构,特别是评论排除和歌词排除部分,将复杂的配置项移入了独立的模态框中,使得设置界面更加整洁。同时,对一些设置项的字段名进行了优化,提高了代码的清晰度和一致性。此外,还为禁用的设置项增加了提示,改善了用户体验。整体来看,这是一次不错的重构。我发现了一些可以改进的地方,主要涉及导出功能的用户体验和代码的类型安全,具体请看我的评论。

Comment on lines +111 to +112
keywords: settingStore.excludeCommentKeywords || [],
regexes: settingStore.excludeCommentRegexes || [],
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

导出功能目前导出的是 Pinia store 中已保存的数据,而不是当前界面上(可能未保存)的规则。这可能会导致用户在编辑规则后导出时,得到的是旧的规则,从而产生困惑。建议修改为导出当前界面 filterKeywordsfilterRegexes 的值,以符合用户预期。

    keywords: filterKeywords.value || [],
    regexes: filterRegexes.value || [],

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

我保持了原来的逻辑没动吧 觉得需要也可以改

Comment on lines +128 to +130
input.onchange = (e: any) => {
const file = e.target.files[0];
if (!file) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

在 TypeScript 中,应尽量避免使用 any 类型。这里的事件参数 e 可以被更精确地类型化,以增强代码的类型安全性和可读性。

  input.onchange = (event: Event) => {
    const file = (event.target as HTMLInputElement).files?.[0];
    if (!file) return;

Comment on lines +144 to +145
keywords: settingStore.excludeLyricsUserKeywords || [],
regexes: settingStore.excludeLyricsUserRegexes || [],
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

与评论排除模块类似,此处的导出功能也是直接从 Pinia store 中读取数据。为了提供更直观的用户体验,建议导出当前界面中的(可能未保存的)规则,即 filterKeywordsfilterRegexes 的值。

    keywords: filterKeywords.value || [],
    regexes: filterRegexes.value || [],

Comment on lines +161 to +163
input.onchange = (e: any) => {
const file = e.target.files[0];
if (!file) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

为了提高代码的类型安全,建议为事件参数 e 提供更具体的类型,而不是使用 any

  input.onchange = (event: Event) => {
    const file = (event.target as HTMLInputElement).files?.[0];
    if (!file) return;

@MoYingJi
Copy link
Collaborator Author

其实担心的是我把排除评论和歌词的模态框都调整成这样的统一样式了,不知道好不好的说

image image image

@imsyy
Copy link
Owner

imsyy commented Jan 29, 2026

其实担心的是我把排除评论和歌词的模态框都调整成这样的统一样式了,不知道好不好的说

image image image

好的不得了(

@imsyy imsyy merged commit 7fb0d14 into imsyy:dev Jan 29, 2026
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