fix: bouton Historique visible directement dans la barre d'actions note
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m20s
CI / Deploy production (on server) (push) Successful in 23s

Avant: History caché dans le menu '...' (MoreVertical) — invisible
Maintenant: bouton History standalone comme Pin/Reminder/Color
- Vert emerald si versioning activé
- Gris discret si versioning désactivé
- Cliquer ouvre l'historique ou l'activation
This commit is contained in:
Antigravity
2026-07-04 21:00:56 +00:00
parent a7e3646ae6
commit 06c771ee9d

View File

@@ -180,10 +180,10 @@ export function NoteActions({
const iconMap: Record<string, React.ElementType> = { text: AlignLeft, markdown: FileCode2, richtext: PenLine, checklist: ListChecks }
const TypeIcon = iconMap[noteType] || FileText
return (
<Button
variant="ghost"
size="sm"
className={cn("h-8 gap-1 px-2 text-xs", noteType !== 'text' && "text-primary bg-primary/10")}
<Button
variant="ghost"
size="sm"
className={cn("h-8 gap-1 px-2 text-xs", noteType !== 'text' && "text-primary bg-primary/10")}
title={noteType === 'markdown' ? 'Markdown' : noteType === 'richtext' ? 'Rich Text' : noteType === 'checklist' ? 'Checklist' : 'Text'}
onClick={onToggleMarkdown}
>
@@ -193,6 +193,19 @@ export function NoteActions({
)
})()}
{/* History — visible directement, pas caché dans le menu */}
{onOpenHistory && (
<Button
variant="ghost"
size="sm"
className={cn("h-8 w-8 p-0", historyEnabled ? "text-emerald-500" : "text-muted-foreground/60")}
title={historyEnabled ? (t('notes.history') || 'Historique') : (t('notes.enableHistory') || "Activer l'historique")}
onClick={onOpenHistory}
>
<History className="h-4 w-4" />
</Button>
)}
{/* More Options */}
<DropdownMenu>
<DropdownMenuTrigger asChild>