diff --git a/src/app/background/index.ts b/src/app/background/index.ts index 0b4fe5d..9f6dd27 100644 --- a/src/app/background/index.ts +++ b/src/app/background/index.ts @@ -167,7 +167,7 @@ async function handleRequest(request: ExtensionRequest, sender: Browser.runtime. case 'authorization.yakit.open': return ok(await engineBridge.requestEngine( 'yakit.browser_authorization.open', - { workspaceId: request.payload.workspaceId }, + request.payload, )); case 'context.capture': { const { tabId, frameId, documentId, ...options } = request.payload; diff --git a/src/entrypoints/options/App.css b/src/entrypoints/options/App.css index 44eca0d..bad30c2 100644 --- a/src/entrypoints/options/App.css +++ b/src/entrypoints/options/App.css @@ -75,6 +75,7 @@ input[type='checkbox'] { width: 15px; height: 15px; flex: 0 0 auto; padding: 0; .sidebar-brand .product-brand { width: 100%; color: var(--foreground); } .sidebar nav { min-height: 0; padding: 10px 10px 16px; overflow-y: auto; display: grid; gap: 10px; scrollbar-width: thin; } .sidebar-group { display: grid; gap: 2px; } +.sidebar-group.is-primary { padding-bottom: 8px; border-bottom: 1px solid var(--border); } .sidebar-group__label { min-height: 24px; padding: 0 10px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--text-xs); font-weight: 650; letter-spacing: .04em; } .sidebar-group__label svg { color: var(--primary); } .sidebar nav button { width: 100%; height: 40px; padding: 0 10px; display: grid; grid-template-columns: 20px 1fr 14px; align-items: center; gap: 8px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--muted-strong); font-size: var(--text-md); font-weight: 500; text-align: left; cursor: pointer; transition: background-color .14s ease, color .14s ease; } diff --git a/src/entrypoints/options/App.tsx b/src/entrypoints/options/App.tsx index a440525..24619fb 100644 --- a/src/entrypoints/options/App.tsx +++ b/src/entrypoints/options/App.tsx @@ -2,8 +2,8 @@ import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react import { browser, type Browser } from 'wxt/browser'; import { Activity, AlertTriangle, Bot, Braces, Check, ChevronRight, CircleGauge, CloudDownload, Cookie, Copy, - Database, Download, Eye, Fingerprint, History, KeyRound, MousePointer2, Network, Play, Power, Radio, - RefreshCw, Route, Save, Search, Send, Server, ShieldCheck, Square, Trash2, Upload, UserRoundCog, Wrench, X, + Database, Download, Eye, FileKey2, Fingerprint, History, KeyRound, MousePointer2, Network, Play, Power, Radio, + RefreshCw, Route, Save, Search, Send, Server, ShieldCheck, Square, Trash2, Upload, UserRoundCog, X, } from 'lucide-react'; import { ProductBrand, YakitMark } from '@/components/brand/Brand'; import { Button } from '@/components/ui/button'; @@ -30,37 +30,43 @@ import { errorMessage, request } from '@/platform/messaging/runtime'; import { APPEARANCE_STORAGE_KEY, getAppearance, setThemePreference, type ThemePreference } from '@/platform/storage/appearance'; import './App.css'; -type Section = 'overview' | 'authorization' | 'proxies' | 'rules' | 'sources' | 'cookies' | 'user-agent' | 'network' | 'context' | 'engine' | 'activity'; +type Section = 'overview' | 'authorization' | 'network' | 'gateway' | 'proxies' | 'rules' | 'sources' | 'cookies' | 'user-agent' | 'context' | 'engine' | 'activity'; const FIREFOX_AMO_BUILD = import.meta.env.FIREFOX && import.meta.env.MODE === 'store'; -const NAVIGATION: Array<{ label: string; icon?: ReactNode; items: Array<{ id: Section; label: string; icon: ReactNode }> }> = [ +const NAVIGATION: Array<{ label?: string; items: Array<{ id: Section; label: string; icon: ReactNode }> }> = [ { - label: '工作区', + items: [{ id: 'overview', label: '概览', icon: }], + }, + { + label: '安全测试', + items: [{ id: 'authorization', label: '越权测试', icon: }], + }, + { + label: '请求与改写', items: [ - { id: 'overview', label: '运行概览', icon: }, - { id: 'authorization', label: '授权测试', icon: }, + { id: 'network', label: '请求捕获', icon: }, + { id: 'gateway', label: '明文网关', icon: }, ], }, { - label: '网络与流量', + label: '代理', items: [ - { id: 'proxies', label: '代理出口', icon: }, - { id: 'rules', label: '自动切换', icon: }, + { id: 'proxies', label: '代理设置', icon: }, + { id: 'rules', label: '分流规则', icon: }, { id: 'sources', label: '规则订阅', icon: }, - { id: 'network', label: '网络活动', icon: }, ], }, { - label: '常用工具', icon: , + label: '浏览器工具', items: [ - { id: 'cookies', label: 'Cookie Editor', icon: }, - { id: 'user-agent', label: 'UA 快速切换', icon: }, + { id: 'context', label: '页面上下文', icon: }, + { id: 'cookies', label: 'Cookie 管理', icon: }, + { id: 'user-agent', label: 'User-Agent', icon: }, ], }, { - label: 'Agent 与系统', + label: '系统', items: [ - { id: 'context', label: '登录态工作区', icon: }, { id: 'engine', label: '引擎连接', icon: }, { id: 'activity', label: '操作记录', icon: }, ], @@ -204,7 +210,7 @@ function App() {