Skip to content

- 在 albums.vue 和 playlists.vue 中根据设置隐藏封面#868

Merged
apoint123 merged 2 commits into
devfrom
dev-feat
Feb 11, 2026
Merged

- 在 albums.vue 和 playlists.vue 中根据设置隐藏封面#868
apoint123 merged 2 commits into
devfrom
dev-feat

Conversation

@kazukokawagawa
Copy link
Copy Markdown
Collaborator

  • 移除 style.ts 文件开头的多余空行
  • 统一 LocalMusicDB.ts 中过长的路径处理代码为单行
  • 在 albums.vue 和 playlists.vue 中根据设置隐藏封面
  • 格式化 PlayerLyric 组件中过长的字体大小设置代码
  • 格式化 Download/layout.vue 中的按钮和标签属性以提升可读性

- 移除 style.ts 文件开头的多余空行
- 统一 LocalMusicDB.ts 中过长的路径处理代码为单行
- 在 albums.vue 和 playlists.vue 中根据设置隐藏封面
- 格式化 PlayerLyric 组件中过长的字体大小设置代码
- 格式化 Download/layout.vue 中的按钮和标签属性以提升可读性
Copilot AI review requested due to automatic review settings February 11, 2026 07:11
@kazukokawagawa kazukokawagawa marked this pull request as draft February 11, 2026 07:11
@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

  • 封面隐藏功能: 根据用户设置,在专辑和歌单视图中实现了封面隐藏功能,提供更灵活的界面定制。
  • 代码格式化与可读性提升: 优化了多个组件(如播放器歌词组件和下载布局)中的代码格式,使其更易读、更规范。
  • 代码清理与简化: 移除了 style.ts 文件中多余的空行,并简化了 LocalMusicDB.ts 中的路径处理代码,提升了代码简洁性。
Changelog
  • electron/main/database/LocalMusicDB.ts
    • 统一了过长的路径处理代码为单行,提升了代码简洁性。
  • src/components/Player/PlayerLyric/AMLyric.vue
    • 格式化了字体大小设置代码,使其更易读。
  • src/components/Player/PlayerLyric/DefaultLyric.vue
    • 格式化了歌词字体大小设置代码,提升了可读性。
  • src/utils/style.ts
    • 移除了文件开头的多余空行。
  • src/views/Download/layout.vue
    • 格式化了按钮和标签属性,以提升代码可读性。
  • src/views/Local/albums.vue
    • 根据设置条件性地隐藏专辑封面。
    • 引入了 useSettingStore 以获取用户设置。
  • src/views/Local/playlists.vue
    • 根据设置条件性地隐藏歌单封面。
    • 引入了 useSettingStore 以获取用户设置。
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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

该 PR 主要让“本地”页面的专辑/歌单列表也能遵循封面隐藏设置,同时做了一些代码格式化与小幅清理,以提升可读性并保持风格一致。

Changes:

  • Local/playlists.vue 中将封面隐藏设置透传到 CoverList(根据 settingStore.hiddenCovers.playlist)。
  • Local/albums.vue 中根据 settingStore.hiddenCovers.album 条件隐藏专辑封面渲染。
  • 对下载页布局、歌词组件样式绑定、LocalMusicDB 路径处理与 style.ts 进行格式化/整理。

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/views/Local/playlists.vue 为本地歌单列表增加按设置隐藏封面能力(传递 hiddenCover)。
src/views/Local/albums.vue 为本地专辑列表增加按设置隐藏封面能力(条件渲染封面)。
src/views/Download/layout.vue 仅对按钮、Tabs 属性进行换行格式化提升可读性。
src/utils/style.ts 移除文件开头多余空行。
src/components/Player/PlayerLyric/DefaultLyric.vue 拆分过长的 getFontSize 调用以提升可读性。
src/components/Player/PlayerLyric/AMLyric.vue 拆分过长的 getFontSize 调用以提升可读性。
electron/main/database/LocalMusicDB.ts 将路径末尾分隔符处理代码合并为单行(等价重排)。

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

:class="['album-item', { choose: chooseAlbum === key }]"
:class="[
'album-item',
{ choose: chooseAlbum === key, 'no-cover': settingStore.hiddenCovers.album },
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

no-cover class is added to the album card when settingStore.hiddenCovers.album is true, but there are no corresponding .no-cover styles in this component’s scoped <style>, so the class currently has no effect. Either remove the conditional class, or add scoped styling (e.g., adjust padding/alignment) to ensure the “hide cover” mode renders as intended.

Suggested change
{ choose: chooseAlbum === key, 'no-cover': settingStore.hiddenCovers.album },
{ choose: chooseAlbum === key },

Copilot uses AI. Check for mistakes.
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 主要包含代码格式化调整和一项新功能:根据用户设置在专辑和歌单页面隐藏封面。
代码格式化部分,通过将多行代码合并为单行、调整组件属性换行等方式,提升了代码的可读性,这些改动都很好。
新功能方面,在 albums.vueplaylists.vue 中添加了根据 settingStore 中的配置来显隐封面的逻辑。
我发现 albums.vue 中虽然添加了 no-cover CSS 类,但缺少对应的样式定义,这可能会导致隐藏封面时 UI 表现不佳。我在具体文件中留下了评论。
除此之外,其他改动看起来都不错。

Comment on lines +8 to +11
:class="[
'album-item',
{ choose: chooseAlbum === key, 'no-cover': settingStore.hiddenCovers.album },
]"
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

为 'no-cover' 类添加了动态绑定,但似乎忘记在 <style> 块中为其定义样式。这可能导致在隐藏封面时,UI 表现与应用其他部分(如歌单列表)不一致。建议为 .album-item.no-cover 添加样式,以确保在无封面时也能有良好的视觉效果和布局。

为无封面专辑的 `.data` 元素添加居中对齐样式,改善视觉呈现。
@kazukokawagawa kazukokawagawa marked this pull request as ready for review February 11, 2026 11:39
@apoint123 apoint123 merged commit 903f0ea into dev Feb 11, 2026
4 checks passed
@apoint123 apoint123 deleted the dev-feat branch February 22, 2026 08:50
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.

3 participants