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
+1 -1
View File
@@ -136,7 +136,7 @@ function PlayerContent() {
return (
<div className="min-h-screen bg-[var(--bg-color)]">
{/* Glass Navbar */}
<PlayerNavbar />
<PlayerNavbar isSecret={isSecret} />
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-20">
{loading ? (
+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"
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "kvideo",
"version": "3.9.0",
"version": "3.9.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "kvideo",
"version": "3.9.0",
"version": "3.9.1",
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "kvideo",
"version": "3.9.0",
"version": "3.9.1",
"private": true,
"scripts": {
"dev": "next dev",