Skip to content

Commit 39e41d4

Browse files
committed
feat: enhance sidebar and page components with improved styling and layout adjustments
1 parent 97077be commit 39e41d4

19 files changed

Lines changed: 34 additions & 48 deletions

src/renderer/src/components/common/PageLineageDisplay.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,14 @@ const PageLineageDisplay: React.FC<PageLineageDisplayProps> = ({
186186
)
187187

188188
const content = (
189-
<div style={{ fontSize: size === 'small' ? '12px' : '14px' }}>
189+
<div
190+
style={{
191+
fontSize: size === 'small' ? '12px' : '14px',
192+
borderBottom: '1px solid #f0f0f0',
193+
backgroundColor: '#fafafa',
194+
padding: '8px 16px'
195+
}}
196+
>
190197
<Space direction="vertical" size={size === 'small' ? 8 : 16} style={{ width: '100%' }}>
191198
{/* 折叠标题 */}
192199
{collapseHeader}

src/renderer/src/components/layout/sidebar/Sidebar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default function Sidebar({
123123
return (
124124
<div className="sidebar-explore">
125125
<div className="sidebar-header">
126-
<h3>资源管理器</h3>
126+
<h4>资源管理器</h4>
127127
<SidebarActions
128128
collapsed={false}
129129
hasCheckedItems={hasCheckedItems}
@@ -147,7 +147,7 @@ export default function Sidebar({
147147
return (
148148
<div className="sidebar-search">
149149
<div className="sidebar-header">
150-
<h3>搜索</h3>
150+
<h4>搜索</h4>
151151
</div>
152152
<div className="sidebar-content">
153153
<GlobalSearch
@@ -164,7 +164,7 @@ export default function Sidebar({
164164
return (
165165
<div className="sidebar-favorites">
166166
<div className="sidebar-header">
167-
<h3>收藏夹</h3>
167+
<h4>收藏夹</h4>
168168
</div>
169169
<div className="sidebar-content">
170170
<FavoritesPanel />
@@ -175,7 +175,7 @@ export default function Sidebar({
175175
return (
176176
<div className="sidebar-tasks">
177177
<div className="sidebar-header">
178-
<h3>任务监控</h3>
178+
<h4>任务监控</h4>
179179
</div>
180180
<div className="sidebar-content">
181181
<TaskMonitor />

src/renderer/src/components/layout/sidebar/sidebar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
display: flex;
2929
align-items: center;
3030
justify-content: space-between;
31-
padding: 16px;
31+
padding: 8px;
3232
border-bottom: 1px solid #f0f0f0;
3333
flex-shrink: 0;
3434
}

src/renderer/src/components/layout/sidebar_items/chat/ChatHistoryTree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function ChatHistoryTree({ onChatClick, onFindInFolder }: ChatHis
5959
useEffect(() => {
6060
const calculateHeight = () => {
6161
if (treeContainerRef.current) {
62-
const containerHeight = window.innerHeight - treeContainerRef.current.offsetTop - 100
62+
const containerHeight = window.innerHeight - treeContainerRef.current.offsetTop - 48
6363
setVirtualHeight(Math.max(400, Math.min(containerHeight, 1200)))
6464
}
6565
}

src/renderer/src/components/layout/sidebar_items/favorites/FavoritesPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ export default function FavoritesPanel() {
593593
<div className="favorites-panel">
594594
{/* 头部:搜索和操作 */}
595595
<div className="favorites-header">
596-
<Search
596+
<Input
597597
placeholder="搜索收藏"
598598
allowClear
599599
onChange={(e) => handleSearch(e.target.value)}

src/renderer/src/components/layout/sidebar_items/favorites/favorites-panel.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
gap: 8px;
1515
align-items: center;
1616
flex-shrink: 0;
17+
background: white;
1718
}
1819

1920
.favorites-search {
@@ -28,7 +29,7 @@
2829
/* 统计信息 */
2930
.favorites-stats {
3031
padding: 8px 12px;
31-
background: #f8f9fa;
32+
background: white;
3233
border-bottom: 1px solid #e8e8e8;
3334
flex-shrink: 0;
3435
}
@@ -44,6 +45,7 @@
4445
overflow-y: auto;
4546
overflow-x: hidden;
4647
padding: 8px;
48+
background: white;
4749
}
4850

4951
.favorites-tree {

src/renderer/src/components/layout/sidebar_items/task/TaskMonitor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ export default function TaskMonitor() {
526526
}}
527527
>
528528
<Title level={5} style={{ margin: 0 }}>
529-
AI任务监控 ({aiTasks.length})
529+
任务列表 ({aiTasks.length})
530530
</Title>
531531
<Space>
532532
{groupedTasks.completed.length > 0 && (

src/renderer/src/components/layout/tabs/TabsArea.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
flex-direction: column;
1111
}
1212

13+
.tabs-area .ant-tabs-nav {
14+
height: 42px;
15+
}
16+
17+
.ant-tabs-top > .ant-tabs-nav {
18+
margin: 0;
19+
}
20+
1321
.tabs-area .ant-tabs-content-holder {
1422
flex: 1;
1523
overflow: hidden;

src/renderer/src/components/pages/chat/ChatWindow.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,7 @@ const ChatWindow = forwardRef<ChatWindowRef, ChatWindowProps>(({ chatId }, ref)
321321
return (
322322
<div className="chat-window">
323323
{/* 页面溯源信息 */}
324-
<div
325-
style={{
326-
borderBottom: '1px solid #f0f0f0',
327-
backgroundColor: '#fafafa',
328-
padding: '8px 16px'
329-
}}
330-
>
331-
<PageLineageDisplay pageId={chatId} size="small" showInCard={false} />
332-
</div>
324+
<PageLineageDisplay pageId={chatId} size="small" showInCard={false} />
333325

334326
<div className="chat-window-content">
335327
<ChatLogic chatId={chatId}>

src/renderer/src/components/pages/chat/messageItem/MessageContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ export const MessageContent: React.FC<MessageContentProps> = ({
136136
{
137137
key: 'reasoning_content',
138138
label: (
139-
<Text type="secondary">
139+
<Space size="small">
140140
<BulbOutlined style={{ marginRight: 4 }} />
141141
思考过程
142-
</Text>
142+
</Space>
143143
),
144144
children: (
145145
<Dropdown

0 commit comments

Comments
 (0)