From 354d13105f6d79d64137433fb904bb5e7709a874 Mon Sep 17 00:00:00 2001 From: thzxx Date: Sat, 27 Jun 2026 22:46:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20Sidebar=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E4=BB=8E=E6=89=8B=E5=86=99=20InputBase+Stack=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20MUI=20TextField?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Sidebar.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 334dd8a..64fa516 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -5,7 +5,7 @@ */ import { useState, useEffect } from 'react'; -import { Box, Typography, Button, IconButton, InputBase, Stack, Collapse, List, ListItemButton, ListItemIcon, ListItemText, Badge, Divider, Dialog, DialogTitle, DialogContent, DialogActions, TextField } from '@mui/material'; +import { Box, Typography, Button, IconButton, TextField, Stack, Collapse, List, ListItemButton, ListItemIcon, ListItemText, Badge, Divider, Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material'; import Fuse from 'fuse.js'; import { Plus, Search, MessageSquare, Pin, Wrench, Database, ChevronDown, ChevronRight, Trash2 } from 'lucide-react'; import { useSessionStore, type Session } from '@renderer/stores/session-store'; @@ -55,10 +55,18 @@ export function Sidebar(): React.JSX.Element { 新建会话 - - - setSearchQuery(e.target.value)} placeholder="搜索会话..." sx={{ flex: 1, fontSize: 12 }} /> - + setSearchQuery(e.target.value)} + placeholder="搜索会话..." + slotProps={{ + input: { + startAdornment: , + }, + }} + sx={{ mb: 1.5, '& .MuiOutlinedInput-root': { fontSize: 12, borderRadius: 1.5 } }} + /> {filteredSessions.length === 0 ? (