Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sidebar style changes #19

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export const useRootViewWrapperStore = () => {
},
{
groupId: 8,
title: 'Acces Control',
title: 'Access Control',
type: MenuGroupTypes.SETTINGS,
items: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/locales/en/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"overrides": "Overrides",
"certificates": "Certificates",
"webhooks": "Webhooks",
"access-control": "Acces Control",
"access-control": "Access Control",
"users": "Users",
"user-groups": "User Groups",
"service-accounts": "Service Accounts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/manage-navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const ManageNavigation = ({
key={item.id}
className="flex w-full grow cursor-not-allowed items-center gap-x-2.5 rounded p-1 px-3 opacity-55"
>
<Icon className="w-3.5" name="shield-lock" size={14} />
<Icon className="w-3.5" name="lock" size={14} />
<Text>{item.title}</Text>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/navbar-skeleton/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function Group({ children, title, topBorder, isSubMenu = false, titleClas
className={cn(
'flex w-full flex-col px-5',
{ 'border-borders-5 border-t pt-2.5': topBorder },
isSubMenu ? 'pb-2.5' : 'gap-1.5 pb-3',
isSubMenu ? 'pb-2.5 gap-y-0.5' : 'gap-1.5 pb-3',
className
)}
>
Expand Down
32 changes: 18 additions & 14 deletions packages/ui/src/components/navbar/navbar-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { NavbarItemType } from '../types'
interface NavbarItemProps {
item: NavbarItemType
isRecent?: boolean
isStaticPinned?: boolean
handleChangePinnedMenuItem: (item: NavbarItemType, pin: boolean) => void
handleRemoveRecentMenuItem: (item: NavbarItemType) => void
handleCustomNav: () => void
Expand All @@ -18,6 +19,7 @@ interface NavbarItemProps {
export const NavbarItem = ({
item,
isRecent = false,
isStaticPinned = false,
handleChangePinnedMenuItem,
handleRemoveRecentMenuItem,
handleCustomNav,
Expand Down Expand Up @@ -75,20 +77,22 @@ export const NavbarItem = ({
/>
)}
</NavLink>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<Button
className="absolute right-[-0.8125rem] top-0 text-icons-4 opacity-0 hover:text-icons-2 focus:opacity-100 focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"
size="sm_icon"
variant="custom"
>
<Icon name="menu-dots" size={12} />
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content className="w-[128px]" align="end" sideOffset={-1} alignOffset={8}>
{dropdownItems}
</DropdownMenu.Content>
</DropdownMenu.Root>
{!isStaticPinned && (
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<Button
className="absolute right-[-0.8125rem] top-0 text-icons-4 opacity-0 hover:text-icons-2 focus:opacity-100 focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"
size="sm_icon"
variant="custom"
>
<Icon name="menu-dots" size={12} />
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content className="w-[128px]" align="end" sideOffset={-1} alignOffset={8}>
{dropdownItems}
</DropdownMenu.Content>
</DropdownMenu.Root>
)}
</div>
)
}
14 changes: 7 additions & 7 deletions packages/ui/src/components/navbar/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const Navbar = ({
handleChangePinnedMenuItem={handleChangePinnedMenuItem}
handleRemoveRecentMenuItem={handleRemoveRecentMenuItem}
handleCustomNav={handleCustomNav}
isStaticPinned
t={t}
/>
))}
Expand All @@ -104,6 +105,12 @@ export const Navbar = ({
)}

<NavbarSkeleton.Group topBorder>
{!!currentUser?.admin && (
<Link to="/admin/default-settings">
<NavbarSkeleton.Item text="User Management" icon={<Icon name="account" size={12} />} />
</Link>
)}

<button onClick={handleSettingsMenu}>
<NavbarSkeleton.Item
text={adminMenuItem.title}
Expand All @@ -115,13 +122,6 @@ export const Navbar = ({
</ScrollArea>

{/*<NavbarAi />*/}
{!!currentUser?.admin && (
<NavbarSkeleton.Group>
<Link to="/admin/default-settings">
<NavbarSkeleton.Item text="User Management" icon={<Icon name="account" size={12} />} />
</Link>
</NavbarSkeleton.Group>
)}
</NavbarSkeleton.Content>

<NavbarSkeleton.Footer>
Expand Down
14 changes: 7 additions & 7 deletions packages/ui/src/icons/artifacts-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions packages/ui/src/icons/chaos-engineering-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading