Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
此 PR 为播放器歌词页新增「歌词制作作者」展示,并提供「复制歌词 / 导出歌词海报图片」的分享能力;同时增强歌词渲染引擎以支持对唱左右分栏、背景人声行置顶与底部信息行插槽承载(用于作者信息等)。
Changes:
- 新增歌词作者提取工具,并在媒体 store 中维护
lyricAuthor,FullPlayer 歌词底部展示并支持跳转作者 GitHub。 - 新增复制歌词弹窗(可选翻译/音译/空行/歌名/歌手),并支持导出 PNG 海报:渲染端生成 canvas → 主进程保存到下载目录。
- 歌词渲染引擎新增 bottom-line 容器与布局能力;对唱行启用左右分栏样式,优化背景人声行与主行的上下顺序/布局。
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/lyric/poster.ts | 新增歌词海报 PNG 生成逻辑(封面解析、折行布局、绘制与导出 Blob) |
| src/utils/lyric/author.ts | 新增从 TTML/LRC 原文提取歌词制作者信息的方法 |
| src/stores/media.ts | 新增 lyricAuthor 状态并在歌词切换时解析/重置 |
| src/i18n/locales/zh-CN.json | 增加“歌词制作 / 复制歌词 / 导出图片”等文案 |
| src/i18n/locales/en-US.json | 增加对应英文文案 |
| src/components/player/Lyrics/renderer.css | 新增对唱左右分栏样式与 credit 行样式 |
| src/components/player/Lyrics/index.vue | 新增 bottom slot,通过 Teleport 挂载到底部行容器 |
| src/components/player/Lyrics/engine/interlude.ts | 扩展间奏圆点状态(锚定行索引与偏移) |
| src/components/player/Lyrics/engine/index.ts | 引擎新增 bottom-line 弹簧与渲染;对唱/背景人声布局优化;间奏圆点锚定跟随 |
| src/components/player/FullPlayer/LyricActions.vue | 新增“复制歌词”入口按钮与弹窗挂载 |
| src/components/player/FullPlayer/index.vue | 在歌词区域 bottom slot 展示作者 credit,并支持外链跳转 |
| src/components/modals/CopyLyricsDialog.vue | 新增复制/导出弹窗与导出流程(调用海报生成 + IPC 保存) |
| electron/preload/index.ts | 新增 window.api.system.saveImage 暴露给渲染层 |
| electron/preload/index.d.ts | 为 saveImage 增加类型声明 |
| electron/main/ipc/system.ts | 新增 system:saveImage IPC:写入下载目录并处理重名 |
| components.d.ts | 组件与图标自动声明更新(CopyLyricsDialog / IconLucideCopy) |
Comment on lines
+80
to
+93
| // 保存图片到下载目录 | ||
| ipcMain.handle("system:saveImage", async (_event, data: ArrayBuffer, fileName: string) => { | ||
| try { | ||
| const dir = app.getPath("downloads"); | ||
| const dot = fileName.lastIndexOf("."); | ||
| const base = dot > 0 ? fileName.slice(0, dot) : fileName; | ||
| const ext = dot > 0 ? fileName.slice(dot) : ""; | ||
| let target = join(dir, fileName); | ||
| for (let i = 2; existsSync(target); i++) { | ||
| target = join(dir, `${base} (${i})${ext}`); | ||
| } | ||
| await writeFile(target, Buffer.from(data)); | ||
| return { success: true, path: target }; | ||
| } catch (error) { |
Comment on lines
+71
to
+75
| const toggleLine = (index: number, checked: boolean): void => { | ||
| selectedLines.value = checked | ||
| ? [...selectedLines.value, index] | ||
| : selectedLines.value.filter((item) => item !== index); | ||
| }; |
roarrabbit
pushed a commit
to roarrabbit/SPlayer-Next
that referenced
this pull request
Aug 27, 2026
feat: 歌词作者显示 & 歌词图片分享
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.