feat: show notebook tree hierarchy in note move, tabs, and agent config
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m32s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m32s
- note-card.tsx: parent/child notebook dropdown with indentation - notes-tabs-view.tsx: tree-structured notebook picker with check marks - agent-detail-view.tsx: source/target notebook selects with optgroup tree - Add notebook-tree-select.tsx shared utility component
This commit is contained in:
@@ -547,23 +547,36 @@ function NoteMetaSidebar({
|
||||
: <span className="h-3 w-3 shrink-0" />}
|
||||
{t('notes.generalNotes')}
|
||||
</button>
|
||||
{notebooks.map((nb) => (
|
||||
<button
|
||||
key={nb.id}
|
||||
type="button"
|
||||
onClick={() => handleMoveToNotebook(nb.id)}
|
||||
className={cn(
|
||||
'flex w-full items-center gap-2 rounded px-2 py-1.5 text-[12px] font-medium hover:bg-muted transition-colors',
|
||||
note.notebookId === nb.id ? 'text-primary' : 'text-foreground/70'
|
||||
)}
|
||||
>
|
||||
{note.notebookId === nb.id
|
||||
? <Check className="h-3 w-3 shrink-0" />
|
||||
: <span className="h-3 w-3 shrink-0" />}
|
||||
{nb.name}
|
||||
</button>
|
||||
))}
|
||||
</PopoverContent>
|
||||
{notebooks.filter(nb => !nb.parentId).map((nb) => (
|
||||
<div key={nb.id}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => handleMoveToNotebook(nb.id)}
|
||||
className={cn(
|
||||
'flex w-full items-center gap-2 rounded px-2 py-1.5 text-[12px] font-medium hover:bg-muted transition-colors',
|
||||
note.notebookId === nb.id ? 'text-primary' : 'text-foreground/70'
|
||||
)}
|
||||
>
|
||||
{note.notebookId === nb.id ? <Check className="h-3 w-3 shrink-0" /> : <span className="h-3 w-3 shrink-0" />}
|
||||
{nb.name}
|
||||
</button>
|
||||
{notebooks.filter(c => c.parentId === nb.id).map(child => (
|
||||
<button
|
||||
key={child.id}
|
||||
type="button"
|
||||
onClick={() => handleMoveToNotebook(child.id)}
|
||||
className={cn(
|
||||
'flex w-full items-center gap-2 rounded pl-6 pr-2 py-1.5 text-[12px] font-medium hover:bg-muted transition-colors',
|
||||
note.notebookId === child.id ? 'text-primary' : 'text-foreground/70'
|
||||
)}
|
||||
>
|
||||
{note.notebookId === child.id ? <Check className="h-3 w-3 shrink-0" /> : <span className="h-3 w-3 shrink-0" />}
|
||||
└ {child.name}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
{/* Pin / Unpin */}
|
||||
|
||||
Reference in New Issue
Block a user