feat: adjust button position

This commit is contained in:
shinya
2025-06-30 12:52:31 +08:00
parent da3841dd93
commit 770cf1c02b

View File

@@ -1114,15 +1114,27 @@ function PlayPageClient() {
)} )}
</div> </div>
{/* 数据源徽章放置在右侧,不影响标题居中 */} <div className='absolute right-2 sm:right-6 flex flex-row items-center space-x-1'>
{sourceName && ( {totalEpisodes > 1 && (
<span <div
className='absolute right-2 sm:right-6 text-gray-300 text-sm border border-gray-500/60 px-2 py-[1px] rounded cursor-pointer hover:bg-gray-600/30 transition-colors' className='vds-button text-sm'
onClick={onOpenSourcePanel} onClick={() => {
> setShowEpisodePanel(true);
{sourceName} playerContainerRef.current?.focus();
</span> }}
)} >
</div>
)}
{sourceName && (
<span
className='text-gray-300 text-sm border border-gray-500/60 px-2 py-[1px] rounded cursor-pointer hover:bg-gray-600/30 transition-colors'
onClick={onOpenSourcePanel}
>
{sourceName}
</span>
)}
</div>
</div> </div>
</div> </div>
); );
@@ -1370,7 +1382,6 @@ function PlayPageClient() {
) : null, ) : null,
beforeFullscreenButton: ( beforeFullscreenButton: (
<> <>
<PlaybackRateButton playerRef={playerRef} />
<button <button
className='vds-button' className='vds-button'
aria-label={blockAdEnabled ? '关闭去广告' : '开启去广告'} aria-label={blockAdEnabled ? '关闭去广告' : '开启去广告'}
@@ -1387,6 +1398,7 @@ function PlayPageClient() {
> >
<AdBlockIcon enabled={blockAdEnabled} /> <AdBlockIcon enabled={blockAdEnabled} />
</button> </button>
<PlaybackRateButton playerRef={playerRef} />
{/* 自定义 AirPlay 按钮 */} {/* 自定义 AirPlay 按钮 */}
<AirPlayButton className='vds-button'> <AirPlayButton className='vds-button'>
<AirPlayIcon className='vds-icon' /> <AirPlayIcon className='vds-icon' />
@@ -1746,7 +1758,7 @@ const PlaybackRateButton = ({
}; };
return ( return (
<button className='vds-button mr-2' onClick={cycleRate}> <button className='vds-button' onClick={cycleRate}>
{rate === 1 ? '倍速' : `${rate.toFixed(2)}x`} {rate === 1 ? '倍速' : `${rate.toFixed(2)}x`}
</button> </button>
); );