diff --git a/web/src/app/home/bots/botConfig.module.css b/web/src/app/home/bots/botConfig.module.css index 3b13cacc..f3c3448d 100644 --- a/web/src/app/home/bots/botConfig.module.css +++ b/web/src/app/home/bots/botConfig.module.css @@ -1,11 +1,11 @@ .botListContainer { align-self: flex-start; justify-self: flex-start; - width: calc(100% - 60px); + width: calc(100%); margin: auto; display: grid; - grid-template-rows: repeat(auto-fill, minmax(220px, 1fr)); - grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); + grid-template-rows: repeat(auto-fill, minmax(10rem, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 2rem; justify-items: center; align-items: center; diff --git a/web/src/app/home/components/home-sidebar/HomeSidebar.module.css b/web/src/app/home/components/home-sidebar/HomeSidebar.module.css index 4f582eb2..ce8b99f5 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebar.module.css +++ b/web/src/app/home/components/home-sidebar/HomeSidebar.module.css @@ -2,11 +2,14 @@ box-sizing: border-box; width: 200px; height: 100vh; - background-color: #FFF; + background-color: #ffffff; display: flex; flex-direction: column; - align-items: center; + align-items: flex-start; + justify-content: space-between; + padding-block: 1rem; user-select: none; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1); } .langbotIconContainer { @@ -45,6 +48,15 @@ } } +.sidebarTopContainer { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 0.5rem; +} + .sidebarChildContainer { width: 10rem; @@ -77,4 +89,22 @@ width: 20px; height: 20px; background-color: rgba(96, 149, 209, 0); +} + +.sidebarBottomContainer { + width: 100%; + height: 100px; + background-color: #ffffff; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.sidebarBottomChildContainer { + width: 100%; + height: 50px; + background-color: aqua; + display: flex; + flex-direction: row; } \ No newline at end of file diff --git a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx index 7607fc7f..c18e2a59 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx +++ b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx @@ -9,6 +9,7 @@ import { import { useRouter, usePathname } from 'next/navigation'; import { sidebarConfigList } from '@/app/home/components/home-sidebar/sidbarConfigList'; import langbotIcon from '../../assets/langbot-logo.webp'; +import { Button } from '@/components/ui/button'; // TODO 侧边导航栏要加动画 export default function HomeSidebar({ @@ -70,35 +71,58 @@ export default function HomeSidebar({ return (
- {/* LangBot、ICON区域 */} -
- {/* icon */} - langbot-icon - {/* 文字 */} -
-
LangBot
-
v4.0.0
+
+ {/* LangBot、ICON区域 */} +
+ {/* icon */} + langbot-icon + {/* 文字 */} +
+
LangBot
+
v4.0.0
+
+
+ {/* 菜单列表,后期可升级成配置驱动 */} +
+ {sidebarConfigList.map((config) => { + return ( +
{ + console.log('click:', config.id); + handleChildClick(config); + }} + > + {}} + isSelected={selectedChild.id === config.id} + icon={config.icon} + name={config.name} + /> +
+ ); + })}
- {/* 菜单列表,后期可升级成配置驱动 */} -
- {sidebarConfigList.map((config) => { - return ( -
{ - console.log('click:', config.id); - handleChildClick(config); - }} - > - -
- ); - })} + +
+ + {}} + isSelected={false} + icon={} + name="系统设置" + /> + { + // open docs.langbot.app + window.open('https://docs.langbot.app', '_blank'); + + }} + isSelected={false} + icon={} + name="帮助文档" + />
); diff --git a/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx b/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx index f43c3570..c4585326 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx +++ b/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx @@ -25,14 +25,17 @@ export function SidebarChild({ icon, name, isSelected, + onClick, }: { icon: React.ReactNode; name: string; isSelected: boolean; + onClick: () => void; }) { return (
{icon} diff --git a/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css b/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css index 844b045e..183d59dc 100644 --- a/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css +++ b/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css @@ -1,15 +1,17 @@ .titleBarContainer { width: 100%; - height: 70px; - background-color: #FFF; + height: 6rem; + opacity: 1; font-size: 20px; display: flex; flex-direction: row; align-items: center; + background-color: #f2f2f2; } .titleText { - margin-left: 10px; - font-size: 20px; - font-weight: bold; + margin-left: 3.2rem; + font-size: 1.6rem; + font-weight: 500; + color: #585858; } \ No newline at end of file diff --git a/web/src/app/home/layout.module.css b/web/src/app/home/layout.module.css index 8bc33e35..0055b2dc 100644 --- a/web/src/app/home/layout.module.css +++ b/web/src/app/home/layout.module.css @@ -8,10 +8,10 @@ /* 主内容区域 */ .main { - background-color: #f5f5f7; - padding: 0; + background-color: #f2f2f2; overflow: auto; width: 100%; height: 100%; - padding: 20px; + padding: 1.5rem; + padding-left: 2rem; } \ No newline at end of file diff --git a/web/src/app/home/models/LLMConfig.module.css b/web/src/app/home/models/LLMConfig.module.css index 1a7226ec..08c81537 100644 --- a/web/src/app/home/models/LLMConfig.module.css +++ b/web/src/app/home/models/LLMConfig.module.css @@ -2,11 +2,11 @@ .modelListContainer { align-self: flex-start; justify-self: flex-start; - width: calc(100% - 60px); + width: calc(100%); margin: auto; display: grid; - grid-template-rows: repeat(auto-fill, minmax(220px, 1fr)); - grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); + grid-template-rows: repeat(auto-fill, minmax(10rem, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 2rem; justify-items: center; align-items: center; diff --git a/web/src/app/home/models/page.tsx b/web/src/app/home/models/page.tsx index ca581f06..1856111c 100644 --- a/web/src/app/home/models/page.tsx +++ b/web/src/app/home/models/page.tsx @@ -74,7 +74,7 @@ export default function LLMConfigPage() { } return ( -
+
diff --git a/web/src/app/home/pipelines/pipelineConfig.module.css b/web/src/app/home/pipelines/pipelineConfig.module.css index b18be41f..9ff11247 100644 --- a/web/src/app/home/pipelines/pipelineConfig.module.css +++ b/web/src/app/home/pipelines/pipelineConfig.module.css @@ -12,11 +12,11 @@ .pipelineListContainer { align-self: flex-start; justify-self: flex-start; - width: calc(100% - 60px); + width: calc(100%); margin: auto; display: grid; - grid-template-rows: repeat(auto-fill, minmax(220px, 1fr)); - grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); + grid-template-rows: repeat(auto-fill, minmax(10rem, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 2rem; justify-items: center; align-items: center;