feat: indicateur versioning sur cartes + toolbar éditeur
Note card: - Icône History en overlay bottom-right (visible si historyEnabled=true) - Discrète: text-muted-foreground/50, ne pollue pas l'UI - Tooltip 'Historique des versions activé' Toolbar éditeur: - Icône History à côté du statut Saved/Dirty - Visible seulement en sm+ (desktop) - cursor-help + tooltip i18n: - notes.historyEnabledTooltip ajouté aux 15 locales (FR/EN traduits, 13 EN placeholder)
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
AlertDialogHeader,
|
||||
AlertDialogTitle,
|
||||
} from '@/components/ui/alert-dialog'
|
||||
import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, LogOut, Trash2, AlignLeft, FileCode2, PenLine, ListChecks, ChevronRight, Plus } from 'lucide-react'
|
||||
import { Pin, Bell, GripVertical, X, Link2, FolderOpen, StickyNote, LucideIcon, Folder, Briefcase, FileText, Zap, BarChart3, Globe, Sparkles, Book, Heart, Crown, Music, Building2, LogOut, Trash2, AlignLeft, FileCode2, PenLine, ListChecks, ChevronRight, Plus, History } from 'lucide-react'
|
||||
import { useState, useEffect, useTransition, useOptimistic, memo, useMemo } from 'react'
|
||||
import dynamic from 'next/dynamic'
|
||||
import { useSession } from 'next-auth/react'
|
||||
@@ -594,6 +594,16 @@ export const NoteCard = memo(function NoteCard({
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Versioning indicator */}
|
||||
{optimisticNote.historyEnabled && (
|
||||
<div
|
||||
className="absolute bottom-3 end-3 z-10"
|
||||
title={t('notes.historyEnabledTooltip') || 'Version history enabled'}
|
||||
>
|
||||
<History className="h-3.5 w-3.5 text-muted-foreground/50" />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Fusion Badge */}
|
||||
{note.aiProvider === 'fusion' && optimisticNote.autoGenerated !== null && (
|
||||
<div className="px-1.5 py-0.5 rounded text-[10px] font-medium bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400 border border-purple-200 dark:border-purple-800 flex items-center gap-1 group/badge relative mb-2 w-fit">
|
||||
|
||||
Reference in New Issue
Block a user