Skip to content

feat(上下文菜单): 新增复制歌曲名称和音乐标签编辑选项 在设置菜单中增加两个新的上下文菜单选项:复制歌曲名称和音乐标签编辑。同时调整了菜单项的分隔符显示逻辑,并将"从歌单中删除"选项移动到更合适的位置。#826

Merged
imsyy merged 9 commits into
devfrom
dev-fix
Feb 5, 2026

Conversation

@kazukokawagawa
Copy link
Copy Markdown
Collaborator

No description provided.

当歌词原本就是TTML格式且未与其他歌词合并时,避免重新生成TTML内容,以防止原始内容丢失。同时优化文件扩展名判断逻辑,确保转换后的YRC歌词也能正确保存为TTML格式。
在设置菜单中增加两个新的上下文菜单选项:复制歌曲名称和音乐标签编辑。同时调整了菜单项的分隔符显示逻辑,并将"从歌单中删除"选项移动到更合适的位置。
将侧边栏歌单模式的状态管理从组件本地状态迁移至 Pinia 设置存储中,以支持跨组件状态持久化与同步。
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

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

  • 新增上下文菜单选项: 在设置菜单中增加了“复制歌曲名称”和“音乐标签编辑”两个新的上下文菜单选项,用户现在可以根据需要启用或禁用这些功能。
  • 上下文菜单逻辑优化: 调整了上下文菜单项分隔符的显示逻辑,使其仅在相关选项(如“音乐标签编辑”和“复制歌曲名称”)都启用且歌曲为本地文件时显示。同时,将“从歌单中删除”选项移动到了更合适的位置,以改善用户体验。
  • 歌词文件保存逻辑改进: 优化了歌词文件下载管理器中 TTML 和 YRC 格式的保存逻辑。现在,如果歌词是 YRC 格式并需要转换,或者进行了合并,会重新生成标准 TTML。此更改确保了在不丢失原始内容的前提下,正确处理和保存歌词文件。
Changelog
  • src/components/Modal/Setting/ContextMenuManager.vue
    • 在设置管理界面中添加了“复制歌曲名称”和“音乐标签编辑”的配置项。
  • src/composables/useSongMenu.ts
    • 为“复制歌曲名称”和“音乐标签编辑”上下文菜单项添加了实现,并将其可见性与用户设置关联。
    • 调整了菜单分隔符的显示条件,使其依赖于相关选项的启用状态。
    • 将“从歌单中删除”选项重新定位到上下文菜单中的新位置。
  • src/core/resource/DownloadManager.ts
    • 更新了歌词文件保存机制,以更准确地处理 TTML 和 YRC 格式,确保在转换和合并时正确生成 TTML,并避免不必要的重新生成。
    • 修改了日志输出,增加了保存歌词文件时的内容长度信息。
  • src/stores/setting.ts
    • 在应用程序的设置存储中添加了 copyNamemusicTagEditor 布尔标志,用于控制新上下文菜单选项的启用状态,并设置了默认值。
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

此拉取请求在上下文菜单中添加了“复制歌曲名称”和“音乐标签编辑”两个新选项,并将其移入了设置中进行管理。同时,对菜单项的位置和分隔符的显示逻辑进行了调整。代码整体实现良好,但我发现分隔符的显示逻辑存在一个小问题,可能会在某些设置下导致UI显示不一致,已在代码中提出了修改建议。

Comment thread src/composables/useSongMenu.ts Outdated
Comment on lines +258 to +261
key: "line-2",
type: "divider",
show: isLocal,
show:
isLocal &&
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

此分隔符(line-2)的显示逻辑似乎不太正确。它的可见性不应该依赖于 copyName 选项,因为 copyName 与该分隔符所要分隔的“音乐标签编辑”功能在逻辑上并无直接关联。

当用户在设置中禁用了“复制歌曲名称”但启用了“音乐标签编辑”时,此分隔符将不会显示,导致“音乐标签编辑”选项前缺少了预期的分隔,破坏了菜单项的分组视觉效果。

建议将此处的 show 条件修改为与 meta-edit 项的显示条件保持一致,即仅当“音乐标签编辑”选项本身可见时才显示此分隔符。

            show: settingStore.contextMenuOptions.musicTagEditor && isLocal,

移除对复制名称选项的依赖,仅根据音乐标签编辑器选项和是否为本地歌曲决定是否显示分隔符,以更准确地反映功能可用性。
@kazukokawagawa kazukokawagawa marked this pull request as ready for review February 5, 2026 03:39
@imsyy imsyy merged commit 9a16c16 into dev Feb 5, 2026
3 checks passed
@kazukokawagawa kazukokawagawa deleted the dev-fix branch February 6, 2026 03:32
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