🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat: support new badge on sidebar nav items and enable for video
YuTengjing6e2ef052709a
diff --git a/src/app/[variants]/(main)/home/_layout/Header/components/Nav.tsx b/src/app/[variants]/(main)/home/_layout/Header/components/Nav.tsxindex d6d0555f8d5..a5656346c25 100644--- a/src/app/[variants]/(main)/home/_layout/Header/components/Nav.tsx+++ b/src/app/[variants]/(main)/home/_layout/Header/components/Nav.tsx@@ -1,6 +1,6 @@'use client';-import { Flexbox } from '@lobehub/ui';+import { Flexbox, Tag } from '@lobehub/ui';import { HomeIcon, SearchIcon } from 'lucide-react';import { memo, useMemo } from 'react';import { useTranslation } from 'react-i18next';@@ -18,6 +18,7 @@ import NavItem from '../../../../../../../features/NavPanel/components/NavItem';interface Item {hidden?: boolean | undefined;icon: NavItemProps['icon'];+ isNew?: boolean;key: string;onClick?: () => void;title: NavItemProps['title'];@@ -55,6 +56,7 @@ const Nav = memo(() => {},{icon: getRouteById('video')!.icon,+ isNew: true,key: SidebarTabKey.Video,title: t('tab.video'),url: '/video',@@ -77,12 +79,20 @@ const Nav = memo(() => {[t],);+ const newBadge = (+ <Tag color="blue" size="small">+ {t('new')}+ </Tag>+ );+return (<Flexbox gap={1} paddingInline={4}>{items.map((item) => {+ const extra = item.isNew ? newBadge : undefined;const content = (<NavItemactive={tab === item.key}+ extra={extra}hidden={item.hidden}icon={item.icon}key={item.key}@@ -106,6 +116,7 @@ const Nav = memo(() => {><NavItemactive={tab === item.key}+ extra={extra}hidden={item.hidden}icon={item.icon}title={item.title}