fix: bouton Historique visible directement dans la barre d'actions note
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user