一分钟搭建影视站,支持Docker等部署方式
feat(ui): 播放页头部增加回首页按钮
bestZweieb8c1d99a13b
diff --git a/src/app/watch/page.tsx b/src/app/watch/page.tsxindex 8fdf0ab..eda2361 100644--- a/src/app/watch/page.tsx+++ b/src/app/watch/page.tsx@@ -199,6 +199,7 @@ function WatchContent() {<header className="sticky top-0 z-40 bg-surface/90 backdrop-blur border-b border-line"><div className="max-w-7xl mx-auto px-4 h-14 flex items-center gap-3"><BackButton />+ <HomeButton /><div className="min-w-0"><h1 className="text-sm font-medium text-content truncate">{videoTitle}</h1><p className="text-xs text-faint">@@ -385,3 +386,17 @@ function BackButton() {</button>);}++/** 首页按钮:直达首页,避免从外链进入时逐级 back */+function HomeButton() {+ return (+ <Link+ href="/"+ className="p-2 rounded-md text-muted hover:text-content hover:bg-hover transition-colors"+ aria-label="回首页"+ title="回首页"+ >+ <Icon name="home" className="w-5 h-5" />+ </Link>+ );+}diff --git a/src/components/icon.tsx b/src/components/icon.tsxindex a814002..dc32623 100644--- a/src/components/icon.tsx+++ b/src/components/icon.tsx@@ -23,7 +23,8 @@ export type IconName =| 'filter'| 'link'| 'alert'- | 'gear';+ | 'gear'+ | 'home';const PATHS: Record<IconName, ReactNode> = {close: <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />,@@ -132,6 +133,14 @@ const PATHS: Record<IconName, ReactNode> = {<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></>),+ home: (+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth={2}+ d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75"+ />+ ),};export function Icon({ name, className = 'w-5 h-5' }: { name: IconName; className?: string }) {