@@ -61,18 +61,18 @@ function stepMusic(type: 'prev' | 'next') {
6161 </script >
6262
6363<template >
64- <div class =" w-full flex flex-col gap-3 overflow-hidden border border-hana-blue-200 rounded-lg bg-hana-blue-200/10 p-4 sm:flex-row sm:items-center" >
64+ <div class =" w-full flex flex-col gap-3 overflow-hidden border border-hana-blue-200 rounded-lg bg-hana-blue-200/10 p-4 sm:flex-row sm:items-center dark:bg-hana-black " >
6565 <nuxt-img
6666 :src =" curMusic.album.cover"
6767 :alt =" curMusic.album.title"
6868 class =" aspect-video w-full rounded-lg object-cover sm:aspect-square sm:size-42"
6969 />
7070 <div class =" min-w-0 flex flex-1 flex-col gap-3" >
7171 <div class =" min-w-0 flex flex-col gap-1" >
72- <h3 class =" truncate text-base font-bold leading-snug md:text-lg" >
72+ <h3 class =" truncate text-base font-bold leading-snug md:text-lg dark:text-hana-white " >
7373 {{ curMusic.title }}
7474 </h3 >
75- <p class =" truncate text-sm text-text-3 " >
75+ <p class =" truncate text-sm text-text dark:text-hana-white-700 " >
7676 {{ curMusic.album.title }}
7777 </p >
7878 </div >
@@ -98,9 +98,9 @@ function stepMusic(type: 'prev' | 'next') {
9898 @click =" stepMusic('next')"
9999 />
100100 </div >
101- <input
101+ <!-- < input
102102 id="music-progress"
103- class =" h-2 appearance-none rounded outline-none transition-[box-shadow] duration-200 accent-hana-blue dark:bg-hana-black-700 focus-visible:ring-2 focus-visible:ring-hana-blue-300"
103+ class="h-2 appearance-none rounded outline-none transition-[box-shadow] duration-200 accent-hana-blue dark:bg-hana-black-700 focus-visible:ring-2 focus-visible:ring-hana-blue-300 dark:accent-hana-blue-300 "
104104 type="range"
105105 min="0"
106106 max="1"
@@ -114,8 +114,22 @@ function stepMusic(type: 'prev' | 'next') {
114114 @input="handleInput"
115115 @change="handleChange"
116116 @pointerdown="isSeeking = true"
117- >
118- <div class =" w-full flex items-center justify-between text-xs text-text tabular-nums" >
117+ > -->
118+ <hana-range-input
119+ id =" music-progress"
120+ :min =" 0"
121+ :max =" 1"
122+ :step =" 0.001"
123+ :value =" currentProgress"
124+ :aria-valuemin =" 0"
125+ :aria-valuemax =" 1"
126+ :aria-valuenow =" progressPercent"
127+ aria-label =" 播放进度"
128+ @input =" handleInput"
129+ @change =" handleChange"
130+ @pointerdown =" isSeeking = true"
131+ />
132+ <div class =" w-full flex items-center justify-between text-xs text-text tabular-nums dark:text-hana-white-700" >
119133 <p >{{ formatTime(currentTime) }}</p >
120134 <p >{{ formatTime(curMusic.seconds) }}</p >
121135 </div >
@@ -130,4 +144,13 @@ function stepMusic(type: 'prev' | 'next') {
130144 oklch(0.93 0.0358 205.23 ) calc (var (--progress ) * 100%)
131145 );
132146}
147+
148+ .dark {
149+ #music-progress {
150+ background : linear-gradient (to right ,
151+ oklch(0.75 0.0883 226.04 ) calc (var (--progress ) * 100% ),
152+ oklch(0.93 0.0358 205.23 ) calc (var (--progress ) * 100%)
153+ );
154+ }
155+ }
133156 </style >
0 commit comments