diff --git a/apps/webui/graphql-codegen.ts b/apps/webui/graphql-codegen.ts index f0112eb..4c60969 100644 --- a/apps/webui/graphql-codegen.ts +++ b/apps/webui/graphql-codegen.ts @@ -10,6 +10,9 @@ const config: CodegenConfig = { presetConfig: { gqlTagName: 'gql', }, + config: { + enumsAsConst: true, + }, }, }, }; diff --git a/apps/webui/src/components/detail-card-skeleton.tsx b/apps/webui/src/components/detail-card-skeleton.tsx new file mode 100644 index 0000000..0f44d96 --- /dev/null +++ b/apps/webui/src/components/detail-card-skeleton.tsx @@ -0,0 +1,32 @@ +import { Card, CardContent, CardHeader } from './ui/card'; +import { Skeleton } from './ui/skeleton'; + +export function DetailCardSkeleton() { + return ( +
+
+
+ +
+ + +
+
+ + + + + + + {Array.from({ length: 6 }).map((_, i) => ( +
+ + +
+ ))} +
+
+
+
+ ); +} diff --git a/apps/webui/src/components/layout/nav-main.tsx b/apps/webui/src/components/layout/nav-main.tsx index 45209b0..1afa4a5 100644 --- a/apps/webui/src/components/layout/nav-main.tsx +++ b/apps/webui/src/components/layout/nav-main.tsx @@ -7,6 +7,14 @@ import { CollapsibleContent, CollapsibleTrigger, } from '@/components/ui/collapsible'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { ProLink, type ProLinkProps } from '@/components/ui/pro-link'; import { SidebarGroup, SidebarGroupLabel, @@ -16,9 +24,9 @@ import { SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, + useSidebar, } from '@/components/ui/sidebar'; import { useMatches } from '@tanstack/react-router'; -import { ProLink, type ProLinkProps } from '../ui/pro-link'; export interface NavMainItem { link?: ProLinkProps; @@ -38,6 +46,7 @@ export function NavMain({ groups: NavMainGroup[]; }) { const matches = useMatches(); + const { state } = useSidebar(); const isMenuMatch = (link: ProLinkProps | undefined) => { const linkTo = link?.to; @@ -50,13 +59,84 @@ export function NavMain({ const renderSidebarMenuItemButton = (item: NavMainItem) => { return ( <> - {item.icon && } - {item.title} + {item.icon &&