feat: MVP-5 P2 - Export/Import, Settings, Tests y Validaciones
- Ticket 10: Navegación completa de listas por teclado (↑↓ Enter E F P) - Ticket 13: Historial de navegación contextual con recent-context-list - Ticket 17: Exportación mejorada a Markdown con frontmatter - Ticket 18: Exportación HTML simple y legible - Ticket 19: Importador Markdown mejorado con frontmatter, tags, wiki links - Ticket 20: Importador Obsidian-compatible (wiki links, #tags inline) - Ticket 21: Centro de respaldo y portabilidad en Settings - Ticket 22: Configuración visible de feature flags - Ticket 24: Tests de command palette y captura externa - Ticket 25: Harden de validaciones y límites (50MB backup, 10K notas, etc)
This commit is contained in:
@@ -4,7 +4,8 @@ import Link from 'next/link'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { ArrowRight, Link2, RefreshCw, ExternalLink, Users, ChevronDown, ChevronRight, History } from 'lucide-react'
|
||||
import { ArrowRight, Link2, RefreshCw, ExternalLink, Users, ChevronDown, ChevronRight, History, Clock } from 'lucide-react'
|
||||
import { getNavigationHistory, NavigationEntry } from '@/lib/navigation-history'
|
||||
|
||||
interface BacklinkInfo {
|
||||
id: string
|
||||
@@ -106,6 +107,7 @@ export function NoteConnections({
|
||||
}: NoteConnectionsProps) {
|
||||
const [collapsed, setCollapsed] = useState<Record<string, boolean>>({})
|
||||
const [recentVersions, setRecentVersions] = useState<{ id: string; version: number; createdAt: string }[]>([])
|
||||
const [navigationHistory, setNavigationHistory] = useState<NavigationEntry[]>([])
|
||||
|
||||
useEffect(() => {
|
||||
fetch(`/api/notes/${noteId}/versions`)
|
||||
@@ -114,6 +116,10 @@ export function NoteConnections({
|
||||
.catch(() => setRecentVersions([]))
|
||||
}, [noteId])
|
||||
|
||||
useEffect(() => {
|
||||
setNavigationHistory(getNavigationHistory())
|
||||
}, [noteId])
|
||||
|
||||
const hasAnyConnections =
|
||||
backlinks.length > 0 || outgoingLinks.length > 0 || relatedNotes.length > 0 || coUsedNotes.length > 0
|
||||
|
||||
@@ -206,6 +212,22 @@ export function NoteConnections({
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Navigation history */}
|
||||
{navigationHistory.length > 0 && (
|
||||
<ConnectionGroup
|
||||
title="Vista recientemente"
|
||||
icon={Clock}
|
||||
notes={navigationHistory.slice(0, 5).map((entry) => ({
|
||||
id: entry.noteId,
|
||||
title: entry.title,
|
||||
type: entry.type,
|
||||
}))}
|
||||
emptyMessage="No hay historial de navegación"
|
||||
isCollapsed={collapsed['history']}
|
||||
onToggle={() => toggleCollapsed('history')}
|
||||
/>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user