From 15e25357918c9129481cde843e1be972c06493ec Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Sat, 10 May 2025 10:48:27 +0800 Subject: [PATCH] perf: styles --- .../home-sidebar/sidbarConfigList.tsx | 30 +++++++++---------- .../component/llm-card/LLMCard.module.css | 7 +++++ .../plugin-market/PluginMarketComponent.tsx | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx b/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx index a0429539..9d051534 100644 --- a/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx +++ b/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx @@ -2,21 +2,6 @@ import { SidebarChildVO } from '@/app/home/components/home-sidebar/HomeSidebarCh import styles from './HomeSidebar.module.css'; export const sidebarConfigList = [ - new SidebarChildVO({ - id: 'models', - name: '模型配置', - icon: ( - - - - ), - route: '/home/models', - }), new SidebarChildVO({ id: 'bots', name: '机器人', @@ -32,6 +17,21 @@ export const sidebarConfigList = [ ), route: '/home/bots', }), + new SidebarChildVO({ + id: 'models', + name: '模型配置', + icon: ( + + + + ), + route: '/home/models', + }), new SidebarChildVO({ id: 'pipelines', name: '流水线', diff --git a/web/src/app/home/models/component/llm-card/LLMCard.module.css b/web/src/app/home/models/component/llm-card/LLMCard.module.css index 4b181977..05a50662 100644 --- a/web/src/app/home/models/component/llm-card/LLMCard.module.css +++ b/web/src/app/home/models/component/llm-card/LLMCard.module.css @@ -33,6 +33,7 @@ display: flex; flex-direction: column; gap: 0.2rem; + width: 100%; } .basicInfoText { @@ -67,6 +68,7 @@ align-items: center; justify-content: flex-start; gap: 0.2rem; + width: calc(100% - 3rem); } .baseURLIcon { @@ -77,7 +79,12 @@ .baseURLText { font-size: 1rem; + width: 100%; color: #626262; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; } .abilitiesContainer { diff --git a/web/src/app/home/plugins/plugin-market/PluginMarketComponent.tsx b/web/src/app/home/plugins/plugin-market/PluginMarketComponent.tsx index 9ef951bf..970f1efd 100644 --- a/web/src/app/home/plugins/plugin-market/PluginMarketComponent.tsx +++ b/web/src/app/home/plugins/plugin-market/PluginMarketComponent.tsx @@ -34,7 +34,7 @@ export default function PluginMarketComponent({ const [nowPage, setNowPage] = useState(1); const [searchKeyword, setSearchKeyword] = useState(''); const [loading, setLoading] = useState(false); - const [sortByValue, setSortByValue] = useState('stars'); + const [sortByValue, setSortByValue] = useState('pushed_at'); const [sortOrderValue, setSortOrderValue] = useState('DESC'); const searchTimeout = useRef(null); const pageSize = 10;