From 970fb15f5ab3aa25161acd52c6ee12d4caa5f321 Mon Sep 17 00:00:00 2001 From: Atdunbg Date: Fri, 22 May 2026 00:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=92=AD=E6=94=BE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=BA=E5=8F=B3=E4=BE=A7=E5=BC=B9=E5=87=BA=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 播放列表可以定位正在播放的歌曲位置 添加歌词翻译 新增快捷键 播放/暂停 重构主题设置,支持多种主题 修复评论playerbar查看点击后一直默认评论打开抽屉页面问题 --- src/App.vue | 15 ++- src/components/PlayerBar.vue | 205 ++++++++++++++++++++++++-------- src/components/UpdateDialog.vue | 2 +- src/composables/UserLyric.ts | 25 +++- src/stores/player.ts | 3 +- src/stores/settings.ts | 38 ++++-- src/style.css | 166 +++++++++++++++++++++----- src/utils/lyric.ts | 33 ++++- src/views/Settings.vue | 43 ++++--- 9 files changed, 415 insertions(+), 115 deletions(-) diff --git a/src/App.vue b/src/App.vue index 86c928c..2ed9f46 100644 --- a/src/App.vue +++ b/src/App.vue @@ -184,6 +184,12 @@ :class="roamTab === 'comment' ? 'bg-white/15 text-white font-medium' : 'text-white/50 hover:text-white/80'"> 评论 +
{{ line.text }} + {{ line.translation }}

暂无歌词
@@ -305,7 +312,7 @@ function doSearch() { if (q) router.push({ path: '/discover', query: { q } }); } -const { lyrics, currentLyricIdx } = useLyric(); +const { lyrics, currentLyricIdx, hasTranslation, showTranslation, toggleTranslation } = useLyric(); const lyricScrollContainer = ref(null); const roamLyricHovering = ref(false); const roamLyricPadPx = ref(0); @@ -372,8 +379,8 @@ function getRoamLyricClass(idx: number): string { return 'roam-lyric-active text-accent-text font-semibold text-xl'; } if (diff === 1) return 'text-content/70 text-lg'; - if (diff === 2) return 'text-content-2/50 text-base'; - return 'text-content-3/35 text-base'; + if (diff === 2) return 'text-content-2/50 text-[1rem]'; + return 'text-content-3/35 text-[1rem]'; } function seekToRoamLyric(time: number) { @@ -506,6 +513,7 @@ onMounted(() => { async function registerGlobalShortcuts() { const globalActions: Record void> = { + globalPlayPause: () => player.toggle(), globalPrev: () => player.prev(), globalNext: () => player.next(), globalVolUp: () => player.adjustVolume(5), @@ -551,6 +559,7 @@ onMounted(() => { } const localActions: Record void> = { + playPause: () => player.toggle(), prev: () => player.prev(), next: () => player.next(), volUp: () => player.adjustVolume(5), diff --git a/src/components/PlayerBar.vue b/src/components/PlayerBar.vue index 9d90aa2..3212bc7 100644 --- a/src/components/PlayerBar.vue +++ b/src/components/PlayerBar.vue @@ -104,41 +104,99 @@
- -
-
-

播放列表 ({{ player.queue.length }})

- -
-
-
- {{ idx + 1 }} -
-

{{ song.name }}

-

- -

+ + +
+
+ +
+ +
+
+
+

播放列表

+

{{ player.queue.length }} 首歌曲

+
+
+ + +
-
+ +
+ +
+
+ + + +

播放列表为空

+

去发现好听的音乐吧

+
+ +
+
+ +
+ +
+
+
+ + + +
+
+
+
+

+ {{ song.name }} +

+

+ +

+
+ +
+ +
+ +
-
- + +
diff --git a/src/components/UpdateDialog.vue b/src/components/UpdateDialog.vue index adc8587..49d98bb 100644 --- a/src/components/UpdateDialog.vue +++ b/src/components/UpdateDialog.vue @@ -1,6 +1,6 @@