import { Box, IconButton, Typography, Stack, Tooltip } from '@mui/material'; import SettingsIcon from '@mui/icons-material/Settings'; import OpenInNewIcon from '@mui/icons-material/OpenInNew'; import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew'; import { useRouter } from '@/providers/RouterProvider'; export default function TopBar({ onOpenOptions }: { onOpenOptions: () => void }) { const { currentPage, goBack } = useRouter(); const handleDetach = () => { // 弹出脱离窗口 (以独立面板形式打开当前 URL) chrome.windows.create({ url: window.location.href, type: 'panel', width: 420, height: 600 }); }; const isDashboard = currentPage === 'dashboard'; return ( {!isDashboard && ( )} Testing Tools ); }