feat: added in search and user settings to sidebar
Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
@@ -6,11 +6,13 @@ app:
|
||||
packages: all
|
||||
|
||||
extensions:
|
||||
|
||||
# Disable the nav items that we're manually rendering in packages/app/src/modules/nav/Sidebar.tsx
|
||||
- nav-item:search: false
|
||||
- nav-item:user-settings: false
|
||||
- nav-item:catalog: false
|
||||
- nav-item:scaffolder: false
|
||||
|
||||
|
||||
organization:
|
||||
name: My Company
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
SidebarGroup,
|
||||
SidebarItem,
|
||||
SidebarScrollWrapper,
|
||||
SidebarSpace,
|
||||
} from '@backstage/core-components';
|
||||
import { compatWrapper } from '@backstage/core-compat-api';
|
||||
import { Sidebar } from '@backstage/core-components';
|
||||
@@ -11,6 +12,9 @@ import { SidebarLogo } from './SidebarLogo';
|
||||
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
import MenuIcon from '@material-ui/icons/Menu';
|
||||
import SearchIcon from '@material-ui/icons/Search';
|
||||
import { SidebarSearchModal } from '@backstage/plugin-search';
|
||||
import { UserSettingsSignInAvatar, Settings as SidebarSettings } from '@backstage/plugin-user-settings';
|
||||
|
||||
export const SidebarContent = NavContentBlueprint.make({
|
||||
params: {
|
||||
@@ -18,6 +22,10 @@ export const SidebarContent = NavContentBlueprint.make({
|
||||
compatWrapper(
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
|
||||
<SidebarSearchModal />
|
||||
</SidebarGroup>
|
||||
<SidebarDivider />
|
||||
<SidebarGroup label="Menu" icon={<MenuIcon />}>
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
@@ -35,6 +43,15 @@ export const SidebarContent = NavContentBlueprint.make({
|
||||
))}
|
||||
</SidebarScrollWrapper>
|
||||
</SidebarGroup>
|
||||
<SidebarSpace />
|
||||
<SidebarDivider />
|
||||
<SidebarGroup
|
||||
label="Settings"
|
||||
icon={<UserSettingsSignInAvatar />}
|
||||
to="/settings"
|
||||
>
|
||||
<SidebarSettings />
|
||||
</SidebarGroup>
|
||||
</Sidebar>,
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user