diff --git a/src/components/ScrollingLyrics.vue b/src/components/ScrollingLyrics.vue new file mode 100644 index 0000000..3093d4b --- /dev/null +++ b/src/components/ScrollingLyrics.vue @@ -0,0 +1,143 @@ + + + \ No newline at end of file diff --git a/src/pages/Playroom.vue b/src/pages/Playroom.vue index 291e621..aec5624 100644 --- a/src/pages/Playroom.vue +++ b/src/pages/Playroom.vue @@ -8,6 +8,8 @@ import { useTemplateRef } from 'vue' import { ref, watch } from 'vue' import { usePreferences } from '../stores/usePreferences' +import ScrollingLyrics from '../components/ScrollingLyrics.vue' + import RewindIcon from '../assets/icons/rewind.vue' import ForwardIcon from '../assets/icons/forward.vue' import PlayIcon from '../assets/icons/play.vue' @@ -157,182 +159,187 @@ function calculateStickyTop() {
-
-
- -
-
-
-
- {{ getCurrentTrack().song.name }} +
+
+
+ +
+
+
+
+ {{ getCurrentTrack().song.name }} +
+
+ {{ getCurrentTrack().song.artists ?? [] }} — + {{ getCurrentTrack().album?.name ?? '未知专辑' }} +
-
- {{ getCurrentTrack().song.artists ?? [] }} — - {{ getCurrentTrack().album?.name ?? '未知专辑' }} -
-
- -
-
- {{ getCurrentTrack().song.name }} -
-
- {{ artistsOrganize(getCurrentTrack().song.artists ?? []) }} — - {{ getCurrentTrack().album?.name ?? '未知专辑' }} + +
+
+ {{ getCurrentTrack().song.name }} +
+
+ {{ artistsOrganize(getCurrentTrack().song.artists ?? []) }} — + {{ getCurrentTrack().album?.name ?? '未知专辑' }} +
+
+
- -
+
+
+
+
+
+
-
-
-
-
-
-
- -
-
- {{ timeFormatter(Math.floor(playQueueStore.currentTime)) }} - {{ timeFormatter(Math.floor(playQueueStore.currentTime)) }} -
-
- {{ formatDetector() }} - {{ formatDetector() }} -
-
-
- +
+
+ + +
+ +
+
+ + +
+ +
+ + + + + + +
+ +
+
+ +
- - -
- -
-
- - -
- -
- - - - - - -
- -
-
- - -
- +
+ +
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index b1fd495..a9d1195 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -38,4 +38,18 @@ interface ApiResponse { interface QueueItem { song: Song album?: Album +} + +interface LyricsLine { + type: 'lyric' + time: number + text: string + originalTime: string +} + +interface GapLine { + type: 'gap' + time: number + originalTime: string + duration?: number // 添加间隔持续时间 } \ No newline at end of file