diff --git a/src/components/download/GalleryQueueItem.tsx b/src/components/download/GalleryQueueItem.tsx index 26ea478a..0d852b7e 100644 --- a/src/components/download/GalleryQueueItem.tsx +++ b/src/components/download/GalleryQueueItem.tsx @@ -1,7 +1,7 @@ -import { revealItemInDir } from '@tauri-apps/plugin-opener'; import { CheckCircle2, Clock, FolderOpen, Globe, Loader2, X, XCircle } from 'lucide-react'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { openFileLocation } from '@/lib/open-file-location'; import type { DownloadItem } from '@/lib/types'; import { cn } from '@/lib/utils'; @@ -27,7 +27,7 @@ export function GalleryQueueItem({ const handleOpenFolder = useCallback(async () => { if (!item.completedFilepath) return; try { - await revealItemInDir(item.completedFilepath); + await openFileLocation(item.completedFilepath); } catch (error) { console.error('Failed to open gallery output folder:', error); } diff --git a/src/components/download/QueueItem.tsx b/src/components/download/QueueItem.tsx index a04d2e3a..5604a263 100644 --- a/src/components/download/QueueItem.tsx +++ b/src/components/download/QueueItem.tsx @@ -1,4 +1,3 @@ -import { revealItemInDir } from '@tauri-apps/plugin-opener'; import { CheckCircle2, ChevronDown, @@ -24,6 +23,7 @@ import { SchedulePopover } from '@/components/download/SchedulePopover'; import { SimpleMarkdown } from '@/components/ui/simple-markdown'; import { useAI } from '@/contexts/AIContext'; import type { ScheduleConfig } from '@/hooks/useSchedule'; +import { openFileLocation } from '@/lib/open-file-location'; import type { DownloadItem, ItemDownloadSettings } from '@/lib/types'; import { cn } from '@/lib/utils'; import { extractYouTubeVideoId, youtubeThumbnailUrl } from '@/lib/youtube-url'; @@ -233,7 +233,7 @@ export function QueueItem({ if (!item.completedFilepath) return; try { - await revealItemInDir(item.completedFilepath); + await openFileLocation(item.completedFilepath); } catch (error) { console.error('Failed to open completed file location:', error); } diff --git a/src/components/download/UniversalQueueItem.tsx b/src/components/download/UniversalQueueItem.tsx index ea824f04..5bf8927a 100644 --- a/src/components/download/UniversalQueueItem.tsx +++ b/src/components/download/UniversalQueueItem.tsx @@ -1,4 +1,3 @@ -import { revealItemInDir } from '@tauri-apps/plugin-opener'; import { CheckCircle2, ChevronDown, @@ -24,6 +23,7 @@ import { SchedulePopover } from '@/components/download/SchedulePopover'; import { SimpleMarkdown } from '@/components/ui/simple-markdown'; import { useAI } from '@/contexts/AIContext'; import type { ScheduleConfig } from '@/hooks/useSchedule'; +import { openFileLocation } from '@/lib/open-file-location'; import type { DownloadItem, ItemUniversalSettings } from '@/lib/types'; import { cn } from '@/lib/utils'; import { SourceBadge } from './SourceBadge'; @@ -215,7 +215,7 @@ export function UniversalQueueItem({ if (!item.completedFilepath) return; try { - await revealItemInDir(item.completedFilepath); + await openFileLocation(item.completedFilepath); } catch (error) { console.error('Failed to open completed file location:', error); } diff --git a/src/components/processing/ChatPanel.tsx b/src/components/processing/ChatPanel.tsx index bdf1ec03..afeee9b8 100644 --- a/src/components/processing/ChatPanel.tsx +++ b/src/components/processing/ChatPanel.tsx @@ -1,5 +1,4 @@ import { open } from '@tauri-apps/plugin-dialog'; -import { revealItemInDir } from '@tauri-apps/plugin-opener'; import { Check, FileText, @@ -20,6 +19,7 @@ import { type DragEvent, useCallback, useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next'; import { ScrollArea } from '@/components/ui/scroll-area'; import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; +import { openFileLocation } from '@/lib/open-file-location'; import type { ChatAttachment, ChatMessage, ProcessingProgress } from '@/lib/types'; import { cn } from '@/lib/utils'; @@ -403,7 +403,7 @@ export function ChatPanel({