Skip to content

Commit c4458ae

Browse files
committed
feat: 添加 TVBox 配置按钮,支持跳转到配置页面
1 parent ac29b75 commit c4458ae

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

public/sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/UserMenu.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
'use client';
44

5-
import { KeyRound, LogOut, Settings, Shield, User, X } from 'lucide-react';
5+
import { KeyRound, LogOut, Settings, Shield, Tv, User, X } from 'lucide-react';
66
import { useRouter } from 'next/navigation';
77
import { useEffect, useState } from 'react';
88
import { createPortal } from 'react-dom';
@@ -149,6 +149,11 @@ export const UserMenu: React.FC = () => {
149149
router.push('/admin');
150150
};
151151

152+
const handleTVBoxConfig = () => {
153+
setIsOpen(false);
154+
router.push('/config');
155+
};
156+
152157
const handleChangePassword = () => {
153158
setIsOpen(false);
154159
setIsChangePasswordOpen(true);
@@ -363,6 +368,15 @@ export const UserMenu: React.FC = () => {
363368
<span className='font-medium'>设置</span>
364369
</button>
365370

371+
{/* TVBox配置按钮 */}
372+
<button
373+
onClick={handleTVBoxConfig}
374+
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'
375+
>
376+
<Tv className='w-4 h-4 text-gray-500 dark:text-gray-400' />
377+
<span className='font-medium'>TVBox配置</span>
378+
</button>
379+
366380
{/* 管理面板按钮 */}
367381
{showAdminPanel && (
368382
<button

0 commit comments

Comments
 (0)