mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-20 03:03:43 +08:00
feat: add isSecret prop to PlayerNavbar for conditional navigation and title text, and update package version
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user