From 2fc86c61b71d61d2c15a16eccb6730ec5ebe7fce Mon Sep 17 00:00:00 2001 From: shinya Date: Sat, 28 Jun 2025 21:23:53 +0800 Subject: [PATCH] feat: refine ad block button --- src/app/play/page.tsx | 87 ++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index af57435..5ecb854 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -8,9 +8,8 @@ import { isHLSProvider, MediaPlayer, MediaProvider, - Menu, } from '@vidstack/react'; -import { AirPlayIcon, SettingsIcon } from '@vidstack/react/icons'; +import { AirPlayIcon } from '@vidstack/react/icons'; import { defaultLayoutIcons, DefaultVideoLayout, @@ -1393,39 +1392,22 @@ function PlayPageClient() { - {/* 设置按钮 */} - - - - - - - - + ), }} @@ -1788,6 +1770,41 @@ const FavoriteIcon = ({ filled }: { filled: boolean }) => { return ; }; +// 新增:去广告图标组件 +const AdBlockIcon = ({ enabled }: { enabled: boolean }) => { + const color = enabled ? '#22c55e' : '#ffffff'; // Tailwind green-500 or white + return ( + + {/* "AD" 文字,居中显示 */} + + AD + + {/* 斜线 */} + + + ); +}; + export default function PlayPage() { return (