style(app): change colors
This commit is contained in:
parent
02eba62fb9
commit
7024537ed3
@ -1,17 +1,25 @@
|
|||||||
import { FileStackIcon } from 'lucide-react'
|
import { ChevronRightIcon, FileStackIcon } from 'lucide-react'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Collapsible,
|
Collapsible,
|
||||||
|
CollapsibleContent,
|
||||||
|
CollapsibleTrigger,
|
||||||
Sidebar as SidebarComp,
|
Sidebar as SidebarComp,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
SidebarFooter,
|
SidebarFooter,
|
||||||
SidebarGroup,
|
SidebarGroup,
|
||||||
SidebarHeader,
|
SidebarHeader,
|
||||||
SidebarMenu,
|
SidebarMenu,
|
||||||
|
SidebarMenuAction,
|
||||||
|
SidebarMenuBadge,
|
||||||
SidebarMenuButton,
|
SidebarMenuButton,
|
||||||
SidebarMenuItem,
|
SidebarMenuItem,
|
||||||
|
SidebarMenuSub,
|
||||||
|
SidebarMenuSubButton,
|
||||||
|
SidebarMenuSubItem,
|
||||||
} from '@boring.tools/ui'
|
} from '@boring.tools/ui'
|
||||||
import { Link } from '@tanstack/react-router'
|
import { Link } from '@tanstack/react-router'
|
||||||
|
import { useChangelogList } from '../hooks/useChangelog'
|
||||||
import { SidebarUser } from './SidebarUser'
|
import { SidebarUser } from './SidebarUser'
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
@ -24,6 +32,7 @@ const items = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export function Sidebar() {
|
export function Sidebar() {
|
||||||
|
const { data, error } = useChangelogList()
|
||||||
return (
|
return (
|
||||||
<SidebarComp>
|
<SidebarComp>
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
@ -49,34 +58,40 @@ export function Sidebar() {
|
|||||||
<Collapsible key={item.title} asChild defaultOpen={item.isActive}>
|
<Collapsible key={item.title} asChild defaultOpen={item.isActive}>
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton asChild tooltip={item.title}>
|
<SidebarMenuButton asChild tooltip={item.title}>
|
||||||
<Link to={item.url}>
|
<Link
|
||||||
|
to={item.url}
|
||||||
|
activeProps={{ className: 'bg-sidebar-accent' }}
|
||||||
|
>
|
||||||
<item.icon />
|
<item.icon />
|
||||||
<span>{item.title}</span>
|
<span>{item.title}</span>
|
||||||
</Link>
|
</Link>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
{/* {item.items?.length ? (
|
|
||||||
<>
|
<CollapsibleTrigger asChild>
|
||||||
<CollapsibleTrigger asChild>
|
<SidebarMenuAction className="data-[state=open]:rotate-90">
|
||||||
<SidebarMenuAction className="data-[state=open]:rotate-90">
|
<ChevronRightIcon />
|
||||||
<ChevronRightIcon />
|
<span className="sr-only">Toggle</span>
|
||||||
<span className="sr-only">Toggle</span>
|
</SidebarMenuAction>
|
||||||
</SidebarMenuAction>
|
</CollapsibleTrigger>
|
||||||
</CollapsibleTrigger>
|
<CollapsibleContent>
|
||||||
<CollapsibleContent>
|
<SidebarMenuSub>
|
||||||
<SidebarMenuSub>
|
{!error &&
|
||||||
{item.items?.map((subItem) => (
|
data?.map((changelog) => (
|
||||||
<SidebarMenuSubItem key={subItem.title}>
|
<SidebarMenuSubItem key={changelog.id}>
|
||||||
<SidebarMenuSubButton asChild>
|
<SidebarMenuSubButton asChild>
|
||||||
<Link to={subItem.url}>
|
<Link
|
||||||
<span>{subItem.title}</span>
|
to={`/changelog/${changelog.id}`}
|
||||||
</Link>
|
activeProps={{
|
||||||
</SidebarMenuSubButton>
|
className: 'bg-sidebar-primary',
|
||||||
</SidebarMenuSubItem>
|
}}
|
||||||
))}
|
>
|
||||||
</SidebarMenuSub>
|
<span>{changelog.title}</span>
|
||||||
</CollapsibleContent>
|
</Link>
|
||||||
</>
|
</SidebarMenuSubButton>
|
||||||
) : null} */}
|
</SidebarMenuSubItem>
|
||||||
|
))}
|
||||||
|
</SidebarMenuSub>
|
||||||
|
</CollapsibleContent>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
</Collapsible>
|
</Collapsible>
|
||||||
))}
|
))}
|
||||||
|
@ -88,6 +88,9 @@ export const useChangelogUpdate = () => {
|
|||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ['changelogById', data.id],
|
queryKey: ['changelogById', data.id],
|
||||||
})
|
})
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: ['changelogList'],
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,9 @@ export const Route = createRootRoute({
|
|||||||
<SignedIn>
|
<SignedIn>
|
||||||
<Layout>
|
<Layout>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
{!import.meta.env.PROD && <TanStackRouterDevtools />}
|
{!import.meta.env.PROD && (
|
||||||
|
<TanStackRouterDevtools position="bottom-right" />
|
||||||
|
)}
|
||||||
</Layout>
|
</Layout>
|
||||||
</SignedIn>
|
</SignedIn>
|
||||||
</>
|
</>
|
||||||
|
@ -51,6 +51,16 @@ export default {
|
|||||||
DEFAULT: 'hsl(var(--card))',
|
DEFAULT: 'hsl(var(--card))',
|
||||||
foreground: 'hsl(var(--card-foreground))',
|
foreground: 'hsl(var(--card-foreground))',
|
||||||
},
|
},
|
||||||
|
sidebar: {
|
||||||
|
DEFAULT: 'hsl(var(--sidebar-background))',
|
||||||
|
foreground: 'hsl(var(--sidebar-foreground))',
|
||||||
|
primary: 'hsl(var(--sidebar-primary))',
|
||||||
|
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
||||||
|
accent: 'hsl(var(--sidebar-accent))',
|
||||||
|
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
||||||
|
border: 'hsl(var(--sidebar-border))',
|
||||||
|
ring: 'hsl(var(--sidebar-ring))',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
lg: 'var(--radius)',
|
lg: 'var(--radius)',
|
||||||
|
Loading…
Reference in New Issue
Block a user