feat: 添加 TVBox 配置按钮,支持跳转到配置页面

This commit is contained in:
katelya
2025-09-03 20:17:25 +08:00
parent ac29b75457
commit c4458ae23a
2 changed files with 16 additions and 2 deletions
+15 -1
View File
@@ -2,7 +2,7 @@
'use client';
import { KeyRound, LogOut, Settings, Shield, User, X } from 'lucide-react';
import { KeyRound, LogOut, Settings, Shield, Tv, User, X } from 'lucide-react';
import { useRouter } from 'next/navigation';
import { useEffect, useState } from 'react';
import { createPortal } from 'react-dom';
@@ -149,6 +149,11 @@ export const UserMenu: React.FC = () => {
router.push('/admin');
};
const handleTVBoxConfig = () => {
setIsOpen(false);
router.push('/config');
};
const handleChangePassword = () => {
setIsOpen(false);
setIsChangePasswordOpen(true);
@@ -363,6 +368,15 @@ export const UserMenu: React.FC = () => {
<span className='font-medium'></span>
</button>
{/* TVBox配置按钮 */}
<button
onClick={handleTVBoxConfig}
className='w-full px-3 py-2 text-left flex items-center gap-2.5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors text-sm'
>
<Tv className='w-4 h-4 text-gray-500 dark:text-gray-400' />
<span className='font-medium'>TVBox配置</span>
</button>
{/* 管理面板按钮 */}
{showAdminPanel && (
<button