feat: improvements
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
/**
|
||||
* Recollection menubar: Back | title + save status | registered menus (middle) | Logos | Flux.
|
||||
* Recollection menubar: Back | title + save status | registered menus (middle).
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
import { Link, NavLink, useParams } from 'react-router-dom'
|
||||
import { Link, useParams } from 'react-router-dom'
|
||||
import { usePlatform } from '@/app/kosmos/KosmosContext'
|
||||
import { ArrowLeft } from 'lucide-react'
|
||||
import { FluxIcon, LogosIcon } from '@/lib/icons'
|
||||
import { useRecollectionMenubar } from './RecollectionMenubarContext'
|
||||
import { RecollectionEditViewMenus } from './RecollectionEditViewMenus'
|
||||
|
||||
@@ -16,7 +15,6 @@ export function RecollectionMenubar() {
|
||||
const { titleContent } = useRecollectionMenubar()
|
||||
|
||||
const recollection = recollectionId ? recollections.find((p) => p.id === recollectionId) : null
|
||||
const base = recollectionId ? `/recollections/${recollectionId}` : ''
|
||||
const defaultTitle = recollection ? (
|
||||
<span className="truncate text-sm font-medium text-muted-foreground">{recollection.name}</span>
|
||||
) : null
|
||||
@@ -36,29 +34,6 @@ export function RecollectionMenubar() {
|
||||
<div className="flex min-w-0 flex-1 items-center gap-1 overflow-visible">
|
||||
<RecollectionEditViewMenus />
|
||||
</div>
|
||||
{base && (
|
||||
<nav className="flex shrink-0 items-center gap-0.5" aria-label="Recollection pages">
|
||||
<NavLink
|
||||
to={`${base}/logos`}
|
||||
end
|
||||
className={({ isActive }) =>
|
||||
`flex items-center gap-1.5 rounded-sm px-2.5 py-1 text-sm outline-none focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground ${isActive ? 'bg-accent font-medium text-foreground' : 'text-muted-foreground'}`
|
||||
}
|
||||
>
|
||||
<LogosIcon className="size-3.5" />
|
||||
Logos
|
||||
</NavLink>
|
||||
<NavLink
|
||||
to={`${base}/flux`}
|
||||
className={({ isActive }) =>
|
||||
`flex items-center gap-1.5 rounded-sm px-2.5 py-1 text-sm outline-none focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground ${isActive ? 'bg-accent font-medium text-foreground' : 'text-muted-foreground'}`
|
||||
}
|
||||
>
|
||||
<FluxIcon className="size-3.5" />
|
||||
Flux
|
||||
</NavLink>
|
||||
</nav>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user