mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
feat(sidebar): add Connectors nav item to workspace sidebar
This commit is contained in:
parent
9c16b7f407
commit
e705a73ae9
2 changed files with 27 additions and 2 deletions
|
|
@ -140,6 +140,10 @@ export function Sidebar({
|
|||
() => navItems.find((item) => item.url.endsWith("/artifacts")),
|
||||
[navItems]
|
||||
);
|
||||
const connectorsItem = useMemo(
|
||||
() => navItems.find((item) => item.url.endsWith("/connectors")),
|
||||
[navItems]
|
||||
);
|
||||
const playgroundItem = useMemo(
|
||||
() => navItems.find((item) => item.url.endsWith("/playground")),
|
||||
[navItems]
|
||||
|
|
@ -150,6 +154,7 @@ export function Sidebar({
|
|||
(item) =>
|
||||
!item.url.endsWith("/automations") &&
|
||||
!item.url.endsWith("/artifacts") &&
|
||||
!item.url.endsWith("/connectors") &&
|
||||
!item.url.endsWith("/playground")
|
||||
),
|
||||
[navItems]
|
||||
|
|
@ -254,6 +259,16 @@ export function Sidebar({
|
|||
tooltipContent={isCollapsed ? artifactsItem.title : undefined}
|
||||
/>
|
||||
)}
|
||||
{connectorsItem && (
|
||||
<SidebarButton
|
||||
icon={connectorsItem.icon}
|
||||
label={connectorsItem.title}
|
||||
onClick={() => onNavItemClick?.(connectorsItem)}
|
||||
isCollapsed={isCollapsed}
|
||||
isActive={connectorsItem.isActive}
|
||||
tooltipContent={isCollapsed ? connectorsItem.title : undefined}
|
||||
/>
|
||||
)}
|
||||
{playgroundItem && (
|
||||
<SidebarButton
|
||||
icon={playgroundItem.icon}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue