feat: add isSecret prop to PlayerNavbar for conditional navigation and title text, and update package version

This commit is contained in:
kuekhaoyang
2026-01-04 18:24:55 +08:00
parent d7cd4c6e36
commit bd0aee233d
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import { ThemeSwitcher } from '@/components/ThemeSwitcher';
import { Icons } from '@/components/ui/Icon';
import { siteConfig } from '@/lib/config/site-config';
export function PlayerNavbar() {
export function PlayerNavbar({ isSecret }: { isSecret?: boolean }) {
const router = useRouter();
return (
@@ -15,9 +15,9 @@ export function PlayerNavbar() {
<div className="flex items-center justify-between gap-2">
<div className="flex items-center gap-2 sm:gap-4 min-w-0">
<button
onClick={() => router.push('/')}
onClick={() => router.push(isSecret ? '/secret' : '/')}
className="flex items-center justify-center hover:opacity-80 transition-opacity flex-shrink-0 cursor-pointer"
title="返回首页"
title={isSecret ? "返回私密主页" : "返回首页"}
>
<Image
src="/icon.png"