From 379a0a2366dcfc7069809b7d324047ea42dd7248 Mon Sep 17 00:00:00 2001 From: DBT Date: Wed, 25 Feb 2026 18:07:06 +0000 Subject: [PATCH] webui: fix white screen routing/base and add mobile responsive sidebar --- webui/src/App.tsx | 2 +- webui/src/components/Header.tsx | 7 +++++-- webui/src/components/Layout.tsx | 5 +++++ webui/src/components/Sidebar.tsx | 4 ++-- webui/src/context/AppContext.tsx | 15 +++++++++++++-- webui/vite.config.ts | 1 + 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/webui/src/App.tsx b/webui/src/App.tsx index 742377f..294dd23 100644 --- a/webui/src/App.tsx +++ b/webui/src/App.tsx @@ -13,7 +13,7 @@ import Skills from './pages/Skills'; export default function App() { return ( - + }> } /> diff --git a/webui/src/components/Header.tsx b/webui/src/components/Header.tsx index f43afb1..b452897 100644 --- a/webui/src/components/Header.tsx +++ b/webui/src/components/Header.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import { Terminal, Globe } from 'lucide-react'; +import { Terminal, Globe, Menu } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { useAppContext } from '../context/AppContext'; const Header: React.FC = () => { const { t, i18n } = useTranslation(); - const { isGatewayOnline } = useAppContext(); + const { isGatewayOnline, setSidebarOpen } = useAppContext(); const toggleLang = () => { const nextLang = i18n.language === 'en' ? 'zh' : 'en'; @@ -15,6 +15,9 @@ const Header: React.FC = () => { return (
+
diff --git a/webui/src/components/Layout.tsx b/webui/src/components/Layout.tsx index 8255519..f25206f 100644 --- a/webui/src/components/Layout.tsx +++ b/webui/src/components/Layout.tsx @@ -3,15 +3,20 @@ import { Outlet, useLocation } from 'react-router-dom'; import { motion, AnimatePresence } from 'motion/react'; import Header from './Header'; import Sidebar from './Sidebar'; +import { useAppContext } from '../context/AppContext'; const Layout: React.FC = () => { const location = useLocation(); + const { sidebarOpen, setSidebarOpen } = useAppContext(); return (
+ {sidebarOpen && ( +