Remove 'All documents' sub-item; Documents label now links to /apps/documents
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -140,36 +140,38 @@ export default function Sidebar() {
|
|||||||
<div className="mt-0.5 space-y-0.5">
|
<div className="mt-0.5 space-y-0.5">
|
||||||
{/* Documents service */}
|
{/* Documents service */}
|
||||||
<div>
|
<div>
|
||||||
<button
|
<div
|
||||||
onClick={() => setDocsOpen((o) => !o)}
|
|
||||||
className={cn(
|
className={cn(
|
||||||
"w-full flex items-center rounded-lg transition-colors text-sm",
|
"flex items-center rounded-lg transition-colors text-sm",
|
||||||
"pl-8 pr-3 py-1.5 gap-2",
|
|
||||||
isDocsRoute
|
isDocsRoute
|
||||||
? "bg-primary/10 text-primary"
|
? "bg-primary/10 text-primary"
|
||||||
: "text-muted hover:bg-muted/20 hover:text-foreground"
|
: "text-muted hover:bg-muted/20 hover:text-foreground"
|
||||||
)}
|
)}
|
||||||
|
>
|
||||||
|
<NavLink
|
||||||
|
to="/apps/documents"
|
||||||
|
end
|
||||||
|
className="flex items-center gap-2 pl-8 pr-2 py-1.5 flex-1 min-w-0"
|
||||||
>
|
>
|
||||||
<FileText className="h-4 w-4 shrink-0" />
|
<FileText className="h-4 w-4 shrink-0" />
|
||||||
<span className="flex-1 text-left whitespace-nowrap">Documents</span>
|
<span className="whitespace-nowrap">Documents</span>
|
||||||
|
</NavLink>
|
||||||
|
<button
|
||||||
|
onClick={() => setDocsOpen((o) => !o)}
|
||||||
|
className="px-2 py-1.5 rounded-r-lg"
|
||||||
|
aria-label={docsOpen ? "Collapse documents" : "Expand documents"}
|
||||||
|
>
|
||||||
{docsOpen ? (
|
{docsOpen ? (
|
||||||
<ChevronDown className="h-3.5 w-3.5 shrink-0" />
|
<ChevronDown className="h-3.5 w-3.5 shrink-0" />
|
||||||
) : (
|
) : (
|
||||||
<ChevronRight className="h-3.5 w-3.5 shrink-0" />
|
<ChevronRight className="h-3.5 w-3.5 shrink-0" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Documents open link + categories */}
|
{/* Categories */}
|
||||||
{docsOpen && (
|
{docsOpen && (
|
||||||
<div className="mt-0.5 space-y-0.5">
|
<div className="mt-0.5 space-y-0.5">
|
||||||
<NavLink
|
|
||||||
to="/apps/documents"
|
|
||||||
end
|
|
||||||
className={({ isActive }) => subSubItemClass(isActive)}
|
|
||||||
>
|
|
||||||
<span className="whitespace-nowrap">All documents</span>
|
|
||||||
</NavLink>
|
|
||||||
|
|
||||||
{categories.map((cat) => (
|
{categories.map((cat) => (
|
||||||
<NavLink
|
<NavLink
|
||||||
key={cat.id}
|
key={cat.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user