webui: fix white screen routing/base and add mobile responsive sidebar

This commit is contained in:
DBT
2026-02-25 18:07:06 +00:00
parent cb8dd4f273
commit 379a0a2366
6 changed files with 27 additions and 7 deletions

View File

@@ -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 (
<header className="h-16 border-b border-zinc-800 bg-zinc-900/50 flex items-center justify-between px-6 shrink-0 z-10">
<div className="flex items-center gap-3">
<button className="md:hidden p-2 rounded-lg hover:bg-zinc-800 text-zinc-300" onClick={() => setSidebarOpen(true)}>
<Menu className="w-5 h-5" />
</button>
<div className="w-9 h-9 rounded-xl bg-indigo-500 flex items-center justify-center shadow-lg shadow-indigo-500/20">
<Terminal className="w-5 h-5 text-white" />
</div>