diff --git a/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx b/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx index ad6ac574..0e98dcc0 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx +++ b/web/src/app/home/components/home-sidebar/HomeSidebarChild.tsx @@ -6,6 +6,7 @@ export interface ISidebarChildVO { name: string; route: string; description: string; + helpLink: string; } export class SidebarChildVO { @@ -14,6 +15,7 @@ export class SidebarChildVO { name: string; route: string; description: string; + helpLink: string; constructor(props: ISidebarChildVO) { this.id = props.id; @@ -21,6 +23,7 @@ export class SidebarChildVO { this.name = props.name; this.route = props.route; this.description = props.description; + this.helpLink = props.helpLink; } } diff --git a/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx b/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx index 49f660fb..e0eef30d 100644 --- a/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx +++ b/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx @@ -17,6 +17,7 @@ export const sidebarConfigList = [ ), route: '/home/bots', description: '创建和管理机器人,这是 LangBot 与各个平台连接的入口', + helpLink: 'https://docs.langbot.app/deploy/platforms/readme.html', }), new SidebarChildVO({ id: 'models', @@ -33,6 +34,7 @@ export const sidebarConfigList = [ ), route: '/home/models', description: '配置和管理可在流水线中使用的模型', + helpLink: 'https://docs.langbot.app/deploy/models/readme.html', }), new SidebarChildVO({ id: 'pipelines', @@ -49,6 +51,7 @@ export const sidebarConfigList = [ ), route: '/home/pipelines', description: '流水线定义了对消息事件的处理流程,用于绑定到机器人', + helpLink: 'https://docs.langbot.app/deploy/pipelines/readme.html', }), new SidebarChildVO({ id: 'plugins', @@ -65,5 +68,6 @@ export const sidebarConfigList = [ ), route: '/home/plugins', description: '安装和配置用于扩展 LangBot 功能的插件', + helpLink: 'https://docs.langbot.app/plugin/plugin-intro.html', }), ]; diff --git a/web/src/app/home/components/home-titlebar/HomeTitleBar.tsx b/web/src/app/home/components/home-titlebar/HomeTitleBar.tsx index c8370976..99e7339f 100644 --- a/web/src/app/home/components/home-titlebar/HomeTitleBar.tsx +++ b/web/src/app/home/components/home-titlebar/HomeTitleBar.tsx @@ -3,14 +3,30 @@ import styles from './HomeTittleBar.module.css'; export default function HomeTitleBar({ title, subtitle, + helpLink, }: { title: string; subtitle: string; + helpLink: string; }) { return (
{title}
-
{subtitle}
+
+ {subtitle} + + + + + + + +
); } 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 a7249c0d..bc740231 100644 --- a/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css +++ b/web/src/app/home/components/home-titlebar/HomeTittleBar.module.css @@ -1,6 +1,6 @@ .titleBarContainer { width: 100%; - padding-top: 0.8rem; + padding-top: 1rem; height: 4rem; opacity: 1; font-size: 20px; @@ -21,4 +21,12 @@ margin-left: 3.2rem; font-size: 0.8rem; color: #808080; + display: flex; + align-items: center; +} + +.helpLink { + margin-left: 0.2rem; + font-size: 0.8rem; + color: #8b8b8b; } diff --git a/web/src/app/home/layout.tsx b/web/src/app/home/layout.tsx index f73c6d7a..6435bddf 100644 --- a/web/src/app/home/layout.tsx +++ b/web/src/app/home/layout.tsx @@ -13,9 +13,11 @@ export default function HomeLayout({ }>) { const [title, setTitle] = useState(''); const [subtitle, setSubtitle] = useState(''); + const [helpLink, setHelpLink] = useState(''); const onSelectedChangeAction = (child: SidebarChildVO) => { setTitle(child.name); setSubtitle(child.description); + setHelpLink(child.helpLink); }; return ( @@ -25,7 +27,7 @@ export default function HomeLayout({
- +
{children}
diff --git a/web/src/app/home/plugins/plugin-installed/PluginInstalledComponent.tsx b/web/src/app/home/plugins/plugin-installed/PluginInstalledComponent.tsx index 5137ecab..0918b7db 100644 --- a/web/src/app/home/plugins/plugin-installed/PluginInstalledComponent.tsx +++ b/web/src/app/home/plugins/plugin-installed/PluginInstalledComponent.tsx @@ -77,7 +77,7 @@ const PluginInstalledComponent = forwardRef( > -
暂无已安装的插件
+
暂未安装任何插件
) : (