From cf5d6a202b038685db2b049cc7be51cbfe159610 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sat, 4 Jul 2026 21:09:27 +0000 Subject: [PATCH] fix: History manquant sur GridCard (le VRAI composant carte grille) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: le mode grille utilise GridCard dans notes-list-views.tsx, PAS NoteCard de note-card.tsx. Toutes les fixes précédentes étaient sur le mauvais composant. Fix: - onOpenHistory ajouté à GridCardSharedProps - Badge History en haut-droite si historyEnabled=true - Bouton History dans la barre d'actions (vert si activé, gris sinon) - Prop threadé: NotesListViews → NotesMasonryGrid → GridCard --- memento-note/components/notes-list-views.tsx | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/memento-note/components/notes-list-views.tsx b/memento-note/components/notes-list-views.tsx index 7677e86..3fde893 100644 --- a/memento-note/components/notes-list-views.tsx +++ b/memento-note/components/notes-list-views.tsx @@ -349,6 +349,7 @@ export function NotesListViews({ onDeleteNote={onDeleteNote} onMoveToNotebook={onMoveToNotebook} onNoteIllustrationGenerated={onNoteIllustrationGenerated} + onOpenHistory={onOpenHistory} onGridReorder={onGridReorder} pinnedLabel={t('notes.pinned')} /> @@ -505,6 +506,7 @@ type GridCardSharedProps = { onMoveToNotebook?: (note: Note, notebookId: string | null) => void | Promise onNoteIllustrationGenerated?: (noteId: string) => void | Promise onNoteIllustrationDeleted?: (noteId: string) => void | Promise + onOpenHistory?: (note: Note) => void isOverlay?: boolean } @@ -713,6 +715,7 @@ const GridCard = memo(function GridCard({ onMoveToNotebook, onNoteIllustrationGenerated, onNoteIllustrationDeleted, + onOpenHistory, isOverlay = false, }: GridCardSharedProps) { const router = useRouter() @@ -758,6 +761,11 @@ const GridCard = memo(function GridCard({ )} + {note.historyEnabled && ( +
+ +
+ )}
@@ -810,6 +818,22 @@ const GridCard = memo(function GridCard({ )} + {onOpenHistory && ( + + )}