Issue #3: User Preferences - export format default - Add userPreferencesStore with localStorage persistence - Create Settings page with export format dropdown and theme toggle - SessionDetailPage now uses default export format from preferences Issue #5: Step Categories - database table and seed data - Migration 007: step_categories table with team scoping - Seed 10 default global categories (Citrix/VDI, AD, M365, etc.) - Full CRUD API at /api/v1/step-categories Issue #6: Step Library - database schema - Migration 008: step_library, step_ratings, step_usage_log tables - Support for decision/action/solution step types - Visibility levels: private, team, public - Rating aggregates and usage tracking Issue #7: Step Library - CRUD API endpoints - Full CRUD at /api/v1/steps with visibility filtering - Full-text search endpoint - Popular tags endpoint - Rating/review system with verified use tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,17 +3,19 @@ import { useParams, useNavigate } from 'react-router-dom'
|
||||
import { Copy, Check, Eye } from 'lucide-react'
|
||||
import { sessionsApi } from '@/api'
|
||||
import { ExportPreviewModal } from '@/components/session/ExportPreviewModal'
|
||||
import { useUserPreferencesStore } from '@/store/userPreferencesStore'
|
||||
import type { Session, SessionExport } from '@/types'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
export function SessionDetailPage() {
|
||||
const { id } = useParams<{ id: string }>()
|
||||
const navigate = useNavigate()
|
||||
const { defaultExportFormat } = useUserPreferencesStore()
|
||||
const [session, setSession] = useState<Session | null>(null)
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
const [isExporting, setIsExporting] = useState(false)
|
||||
const [exportFormat, setExportFormat] = useState<'markdown' | 'text' | 'html'>('markdown')
|
||||
const [exportFormat, setExportFormat] = useState<'markdown' | 'text' | 'html'>(defaultExportFormat)
|
||||
const [exportContent, setExportContent] = useState<string | null>(null)
|
||||
const [showPreview, setShowPreview] = useState(false)
|
||||
const [copied, setCopied] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user