Skip to content

feat: 换源弹窗支持同时替换歌名与歌手 - #689

Merged
laoshuikaixue merged 3 commits into
laoshuikaixue:mainfrom
waji-rui:feat/source-replace-title-artist
Nov 28, 2026
Merged

laoshuikaixue merged 3 commits into
laoshuikaixue:mainfrom
waji-rui:feat/source-replace-title-artist

Conversation

@waji-rui

Copy link
Copy Markdown
Contributor

概述

在管理员后台歌曲管理的换源弹窗中新增「同时替换歌名与歌手」开关,允许管理员在替换音源时一并采用搜索结果的歌名与歌手,减少手动修改。开关默认关闭,关闭时行为与原先完全一致。

改动内容

  • app/components/Admin/SongSourceReplaceModal.vue
    • 底部操作栏新增 checkbox 样式的开关按钮,位于「取消」左侧;选中态高亮,使用 aria-pressed 表达开关语义。
    • 按钮行改为 flex-wrap,窄屏自动换行,开关居左、操作按钮组居右(ml-auto),适配移动端。
    • 勾选后 apply 事件携带选中曲目的 title / artist,关闭时传 null。
    • 打开弹窗时(resetState)重置开关为关闭。
    • 后续样式调整:按钮改为与「取消」一致的纯文字风格,去除背景与轮廓,仅用文字颜色区分状态。
  • app/components/Admin/SongManagement.vue
    • applySourceReplacement 中仅在有值时覆盖编辑表单的 title / artist;沿用原有「先填表单、点保存才落库」机制,服务端换源逻辑未改动。
  • app/utils/locale/zh-CN.ts、app/utils/locale/en-US.ts
    • sourceReplace 分区新增 replaceTitleArtist 词条,两词典结构对齐(各 31 键)。

行为说明

  • 仅影响表单填充内容,不改变原有换源落库流程;仍需点击「保存」才会写入数据库。
  • 歌名与歌手取自当前选中的搜索结果;若搜索结果为该项为空,则保留原值不覆盖。
  • 关闭开关时与改动前行为完全一致。

截图

IMG_20261128_092242

影响范围

仅涉及管理员后台换源弹窗,不影响用户端投稿、搜索、播放与服务端数据。无新增依赖,无数据库迁移。

@netlify

netlify Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for voice-hub-lhzx ready!

Name Link
🔨 Latest commit 8c3462f
🔍 Latest deploy log https://app.netlify.com/projects/voice-hub-lhzx/deploys/6b0a8171183f6f5fb5722d35
😎 Deploy Preview https://deploy-preview-689--voice-hub-lhzx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T01:30:45.088377Z
We couldn’t complete this review. Comment @codex review to try again.
536ff7a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

- 在 SongSourceReplaceModal 组件中添加 allowReplaceTitleArtist 属性
- 在按钮显示逻辑中根据 allowReplaceTitleArtist 控制显示与禁用状态
- 根据 allowReplaceTitleArtist 和 replaceTitleArtist 共同决定是否替换标题和艺人信息
- 更新 SongManagement 组件使用新的 allowReplaceTitleArtist 属性控制模态框行为
@laoshuikaixue
laoshuikaixue merged commit ee6a5e0 into laoshuikaixue:main Nov 28, 2026
11 of 15 checks passed
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