fix(ui): sélection groupée dans la boîte de réception
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 7m17s
CI / Deploy production (on server) (push) Successful in 24s

Permet de cocher plusieurs notes, les déplacer vers un carnet ou les envoyer à la corbeille, et rend la carte mentale plus lisible.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Antigravity
2026-09-01 19:40:10 +00:00
parent 4fc5e3ce04
commit a7b16870a4
15 changed files with 509 additions and 37 deletions

View File

@@ -25,6 +25,7 @@ import { useNotebooks } from '@/context/notebooks-context'
import { toast } from 'sonner'
import { ConfirmDeleteNoteDialog } from '@/components/confirm-delete-note-dialog'
import { showNoteTrashedToast } from '@/lib/notes/trash-toast'
import { NoteSelectCheckbox } from '@/components/note-select-checkbox'
import { fr } from 'date-fns/locale/fr'
import { enUS } from 'date-fns/locale/en-US'
import { formatAbsoluteDateLocalized } from '@/lib/utils/format-localized-date'
@@ -37,6 +38,10 @@ type NotesEditorialViewProps = {
onOpen: (note: Note, readOnly?: boolean) => void
notebookName?: string
onOpenHistory?: (note: Note) => void
selection?: {
selectedIds: ReadonlySet<string>
onToggle: (id: string) => void
}
} & NoteCollectionActions
function formatNoteDate(date: Date | string, language: string): string {
@@ -376,6 +381,7 @@ export function NotesEditorialView({
onMoveToNotebook,
onNotePatch,
onNoteIllustrationGenerated,
selection,
}: NotesEditorialViewProps) {
const { t, language } = useLanguage()
const { data: session } = useSession()
@@ -454,7 +460,14 @@ export function NotesEditorialView({
</div>
<h2 className="font-memento-serif text-2xl font-medium text-foreground flex items-center gap-2 justify-between">
<span className="inline-flex items-center gap-2 truncate">
<span className="inline-flex items-center gap-2 truncate min-w-0">
{selection && (
<NoteSelectCheckbox
checked={selection.selectedIds.has(note.id)}
onToggle={() => selection.onToggle(note.id)}
label={t('notes.selectNote')}
/>
)}
{note.isPinned && <Pin size={14} className="text-amber-500 fill-amber-500 shrink-0" />}
{note.historyEnabled && <History size={14} className="text-emerald-500 shrink-0" />}
{title}