Преглед изворни кода

统一 sidebar 组件中 **我的应用** 、**回到首页**、**新建对话**、**我的收藏** 4个按钮的样式风格

Ryuiso пре 4 недеља
родитељ
комит
b279070ca4
1 измењених фајлова са 35 додато и 9 уклоњено
  1. 35 9
      app/components/sidebar.tsx

+ 35 - 9
app/components/sidebar.tsx

@@ -3,7 +3,7 @@ import styles from "./home.module.scss";
 import DragIcon from "../icons/drag.svg";
 import faviconSrc from "../icons/favicon.png";
 import deepSeekSrc from "../icons/deepSeek.png";
-import { AppstoreOutlined, EditOutlined, MenuOutlined } from '@ant-design/icons';
+import { AppstoreOutlined, EditOutlined, MenuOutlined, HomeOutlined, PlusOutlined, StarOutlined } from '@ant-design/icons';
 import { useAppConfig, useChatStore, useGlobalStore } from "../store";
 import {
   DEFAULT_SIDEBAR_WIDTH,
@@ -565,9 +565,16 @@ export const SideBar = (props: { className?: string }) => {
             }
             logo={getType() === 'bigModel' ? <img style={{ height: 40 }} src={faviconSrc.src} /> : ''}
           >
-            <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 10 }}>
+            <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 10, gap: 8 }}>
               <Button
-                style={{ width: '48%' }}
+                style={{ 
+                  width: '48%', 
+                  height: 36,
+                  borderRadius: 6,
+                  fontSize: 14,
+                  fontWeight: 500
+                }}
+                icon={<HomeOutlined />}
                 onClick={() => {
                   navigate({ pathname: '/' });
                 }}
@@ -575,7 +582,14 @@ export const SideBar = (props: { className?: string }) => {
                 回到首页
               </Button>
               <Button
-                style={{ width: '48%' }}
+                style={{ 
+                  width: '48%', 
+                  height: 36,
+                  borderRadius: 6,
+                  fontSize: 14,
+                  fontWeight: 500
+                }}
+                icon={<PlusOutlined />}
                 onClick={async () => {
                   chatStore.clearSessions();
                   chatStore.updateCurrentSession((value) => {
@@ -603,10 +617,16 @@ export const SideBar = (props: { className?: string }) => {
                 新建对话
               </Button>
             </div>
-            <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 10 }}>
+            <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 10, gap: 8 }}>
               <Button
-                style={{ width: '48%' }}
-                type="primary"
+                style={{ 
+                  width: '48%', 
+                  height: 36,
+                  borderRadius: 6,
+                  fontSize: 14,
+                  fontWeight: 500
+                }}
+                icon={<AppstoreOutlined />}
                 onClick={() => {
                   setDrawerType('all');
                   setDrawerOpen(true);
@@ -615,8 +635,14 @@ export const SideBar = (props: { className?: string }) => {
                 我的应用
               </Button>
               <Button
-                style={{ width: '48%' }}
-                type="primary"
+                style={{ 
+                  width: '48%', 
+                  height: 36,
+                  borderRadius: 6,
+                  fontSize: 14,
+                  fontWeight: 500
+                }}
+                icon={<StarOutlined />}
                 onClick={() => {
                   setDrawerType('collect');
                   setDrawerOpen(true);