diff --git a/src/webui/FE/App.tsx b/src/webui/FE/App.tsx index 188e8bf1..2b814649 100644 --- a/src/webui/FE/App.tsx +++ b/src/webui/FE/App.tsx @@ -13,7 +13,7 @@ import { AnimatedBackground, HostSelector, } from './components'; -import { WebQQPage } from './components/WebQQ'; +import { WebQQPage, WebQQFullscreen } from './components/WebQQ'; import { Config, ResConfig } from './types'; import { apiFetch, setPasswordPromptHandler } from './utils/api'; import { Save, Loader2, Settings, Eye, EyeOff, Plus, Trash2, Menu } from 'lucide-react'; @@ -25,13 +25,13 @@ function App() { // 从 URL hash 读取初始 tab,默认 dashboard const getInitialTab = () => { const hash = window.location.hash.slice(1) // 去掉 # - const validTabs = ['dashboard', 'onebot', 'satori', 'milky', 'logs', 'other', 'webqq', 'about'] + const validTabs = ['dashboard', 'onebot', 'satori', 'milky', 'logs', 'other', 'webqq', 'webqq-fullscreen', 'about'] return validTabs.includes(hash) ? hash : 'dashboard' } const [activeTab, setActiveTab] = useState(getInitialTab); const [config, setConfig] = useState(defaultConfig); - + const [loading, setLoading] = useState(false); const [isLoggedIn, setIsLoggedIn] = useState(false); const [checkingLogin, setCheckingLogin] = useState(true); @@ -66,7 +66,7 @@ function App() { useEffect(() => { const handleHashChange = () => { const hash = window.location.hash.slice(1) - const validTabs = ['dashboard', 'onebot', 'satori', 'milky', 'logs', 'other', 'webqq', 'about'] + const validTabs = ['dashboard', 'onebot', 'satori', 'milky', 'logs', 'other', 'webqq', 'webqq-fullscreen', 'about'] if (validTabs.includes(hash)) { setActiveTab(hash) } @@ -194,15 +194,37 @@ function App() { ); } + // webqq-fullscreen 路由:独立的全屏页面 + if (activeTab === 'webqq-fullscreen') { + return ( + <> + {/* Animated Background */} + + + + + {/* Password Dialog */} + + + {/* Toast Container */} + + + ) + } + // 已登录,显示主页面 return (
{/* Animated Background */} - setSidebarOpen(false)} @@ -211,7 +233,7 @@ function App() {
{/* 移动端顶部导航栏 */}
-
- +
{/* Header - 桌面端显示 */}
diff --git a/src/webui/FE/components/WebQQ/WebQQFullscreen.tsx b/src/webui/FE/components/WebQQ/WebQQFullscreen.tsx new file mode 100644 index 00000000..3820d3fe --- /dev/null +++ b/src/webui/FE/components/WebQQ/WebQQFullscreen.tsx @@ -0,0 +1,16 @@ +import React from 'react' +import WebQQPage from './WebQQPage' + +/** + * WebQQ 全屏版本 + * 用于 #webqq-fullscreen 路由 + */ +const WebQQFullscreen: React.FC = () => { + return ( +
+ +
+ ) +} + +export default WebQQFullscreen diff --git a/src/webui/FE/components/WebQQ/index.ts b/src/webui/FE/components/WebQQ/index.ts index b994b745..c5b95b8f 100644 --- a/src/webui/FE/components/WebQQ/index.ts +++ b/src/webui/FE/components/WebQQ/index.ts @@ -1,5 +1,6 @@ // Main page export { default as WebQQPage } from './WebQQPage' +export { default as WebQQFullscreen } from './WebQQFullscreen' // Chat components export { ChatInput, RichInput, MuteDialog, KickConfirmDialog, TitleDialog } from './chat'