Phase 3: Graph View, Backlinks UI, Quick Switcher, Dark Mode, Export
Features: - GraphView.vue: SVG-based force-directed graph visualization for projects - QuickSwitcher.vue: Cmd+K modal with fuzzy search via /search API - Dark Mode: Theme toggle in Header, persisted in localStorage, system pref support - Backlinks UI: Incoming and outgoing links in DocumentView - Export: Document (markdown/JSON) and Project (ZIP/JSON) export with download - New composables: useTheme.ts for dark/light/system theme management - New store methods: fetchBacklinks, fetchOutgoingLinks, search, exportDocument, fetchProjectGraph, exportProject - TypeScript types for all Phase 3 API responses
This commit is contained in:
@@ -106,6 +106,103 @@ export interface DocumentsResponse {
|
||||
documents: Document[]
|
||||
}
|
||||
|
||||
// Graph types
|
||||
export interface GraphNode {
|
||||
id: string
|
||||
title: string
|
||||
type: 'document'
|
||||
}
|
||||
|
||||
export interface GraphEdge {
|
||||
source: string
|
||||
target: string
|
||||
type: 'reference'
|
||||
}
|
||||
|
||||
export interface GraphStats {
|
||||
total_documents: number
|
||||
total_references: number
|
||||
orphaned_documents: number
|
||||
}
|
||||
|
||||
export interface GraphData {
|
||||
project_id: string
|
||||
nodes: GraphNode[]
|
||||
edges: GraphEdge[]
|
||||
stats: GraphStats
|
||||
}
|
||||
|
||||
// Backlinks types
|
||||
export interface BacklinkItem {
|
||||
document_id: string
|
||||
title: string
|
||||
project_id: string
|
||||
project_name: string
|
||||
excerpt: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface BacklinksResponse {
|
||||
document_id: string
|
||||
backlinks_count: number
|
||||
backlinks: BacklinkItem[]
|
||||
}
|
||||
|
||||
export interface OutgoingLinkItem {
|
||||
document_id: string
|
||||
title: string
|
||||
project_id: string
|
||||
project_name: string
|
||||
exists: boolean
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface OutgoingLinksResponse {
|
||||
document_id: string
|
||||
outgoing_links_count: number
|
||||
outgoing_links: OutgoingLinkItem[]
|
||||
}
|
||||
|
||||
export interface DocumentLinkRef {
|
||||
document_id: string
|
||||
title: string
|
||||
anchor_text: string
|
||||
}
|
||||
|
||||
export interface DocumentLinksResponse {
|
||||
document_id: string
|
||||
outgoing_links: DocumentLinkRef[]
|
||||
backlinks: DocumentLinkRef[]
|
||||
}
|
||||
|
||||
// Search / Quick Switcher types
|
||||
export interface SearchResult {
|
||||
id: string
|
||||
type: 'document' | 'project'
|
||||
title: string
|
||||
subtitle: string | null
|
||||
highlight: string | null
|
||||
icon: string
|
||||
project_id?: string
|
||||
}
|
||||
|
||||
export interface SearchResponse {
|
||||
query: string
|
||||
results: SearchResult[]
|
||||
total: number
|
||||
search_type: string
|
||||
}
|
||||
|
||||
// Export types
|
||||
export interface DocumentExportResponse {
|
||||
// The API returns the raw file, not JSON
|
||||
// This is for type safety on the response
|
||||
}
|
||||
|
||||
export interface ProjectExportResponse {
|
||||
// The API returns the raw file, not JSON
|
||||
}
|
||||
|
||||
// Form inputs
|
||||
export interface LoginForm {
|
||||
username: string
|
||||
|
||||
Reference in New Issue
Block a user