删除旧版本的发布说明文件,更新用户菜单以移除TVBox配置按钮,并在管理页面中添加TVBox配置按钮。
This commit is contained in:
+17
-1
@@ -21,8 +21,16 @@ import {
|
|||||||
verticalListSortingStrategy,
|
verticalListSortingStrategy,
|
||||||
} from '@dnd-kit/sortable';
|
} from '@dnd-kit/sortable';
|
||||||
import { CSS } from '@dnd-kit/utilities';
|
import { CSS } from '@dnd-kit/utilities';
|
||||||
import { ChevronDown, ChevronUp, Settings, Users, Video } from 'lucide-react';
|
import {
|
||||||
|
ChevronDown,
|
||||||
|
ChevronUp,
|
||||||
|
Settings,
|
||||||
|
Tv,
|
||||||
|
Users,
|
||||||
|
Video,
|
||||||
|
} from 'lucide-react';
|
||||||
import { GripVertical } from 'lucide-react';
|
import { GripVertical } from 'lucide-react';
|
||||||
|
import { useRouter } from 'next/navigation';
|
||||||
import { Suspense, useCallback, useEffect, useState } from 'react';
|
import { Suspense, useCallback, useEffect, useState } from 'react';
|
||||||
import Swal from 'sweetalert2';
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@@ -1609,6 +1617,7 @@ const SiteConfigComponent = ({ config }: { config: AdminConfig | null }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function AdminPageClient() {
|
function AdminPageClient() {
|
||||||
|
const router = useRouter();
|
||||||
const [config, setConfig] = useState<AdminConfig | null>(null);
|
const [config, setConfig] = useState<AdminConfig | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
@@ -1728,6 +1737,13 @@ function AdminPageClient() {
|
|||||||
重置配置
|
重置配置
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
<button
|
||||||
|
onClick={() => router.push('/config')}
|
||||||
|
className='px-3 py-1 bg-blue-600 hover:bg-blue-700 text-white text-xs rounded-md transition-colors flex items-center gap-1'
|
||||||
|
>
|
||||||
|
<Tv size={14} />
|
||||||
|
<span>TVBox 配置</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 站点配置标签 */}
|
{/* 站点配置标签 */}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { KeyRound, LogOut, Settings, Shield, Tv, User, X } from 'lucide-react';
|
import { KeyRound, LogOut, Settings, Shield, User, X } from 'lucide-react';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
@@ -149,11 +149,6 @@ export const UserMenu: React.FC = () => {
|
|||||||
router.push('/admin');
|
router.push('/admin');
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleTVBoxConfig = () => {
|
|
||||||
setIsOpen(false);
|
|
||||||
router.push('/config');
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleChangePassword = () => {
|
const handleChangePassword = () => {
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
setIsChangePasswordOpen(true);
|
setIsChangePasswordOpen(true);
|
||||||
@@ -368,15 +363,6 @@ export const UserMenu: React.FC = () => {
|
|||||||
<span className='font-medium'>设置</span>
|
<span className='font-medium'>设置</span>
|
||||||
</button>
|
</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 && (
|
{showAdminPanel && (
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user