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