diff --git a/src/components/ui/shadcn-io/status/index.tsx b/src/components/ui/shadcn-io/status/index.tsx index 7139942b..5131e84c 100644 --- a/src/components/ui/shadcn-io/status/index.tsx +++ b/src/components/ui/shadcn-io/status/index.tsx @@ -17,10 +17,7 @@ export const Status = ({ className, status, ...props }: StatusProps) => ( export type StatusIndicatorProps = HTMLAttributes; -export const StatusIndicator = ({ - className, - ...props -}: StatusIndicatorProps) => ( +export const StatusIndicator = ({ ...props }: StatusIndicatorProps) => ( void; } -export function useDragToDesktop({ - sshSessionId, - sshHost, -}: UseDragToDesktopProps) { +export function useDragToDesktop({ sshSessionId }: UseDragToDesktopProps) { const [state, setState] = useState({ isDragging: false, isDownloading: false, @@ -137,7 +134,7 @@ export function useDragToDesktop({ return false; } }, - [sshSessionId, sshHost], + [sshSessionId], ); const dragFilesToDesktop = useCallback( @@ -246,7 +243,7 @@ export function useDragToDesktop({ return false; } }, - [sshSessionId, sshHost, dragFileToDesktop], + [sshSessionId, dragFileToDesktop], ); const dragFolderToDesktop = useCallback( @@ -274,7 +271,7 @@ export function useDragToDesktop({ return false; }, - [sshSessionId, sshHost], + [], ); return { diff --git a/src/ui/hooks/useDragToSystemDesktop.ts b/src/ui/hooks/useDragToSystemDesktop.ts index 3f0f1368..577d7149 100644 --- a/src/ui/hooks/useDragToSystemDesktop.ts +++ b/src/ui/hooks/useDragToSystemDesktop.ts @@ -21,10 +21,7 @@ interface DragToSystemOptions { onError?: (error: string) => void; } -export function useDragToSystemDesktop({ - sshSessionId, - sshHost, -}: UseDragToSystemProps) { +export function useDragToSystemDesktop({ sshSessionId }: UseDragToSystemProps) { const [state, setState] = useState({ isDragging: false, isDownloading: false, @@ -37,34 +34,6 @@ export function useDragToSystemDesktop({ options: DragToSystemOptions; } | null>(null); - const getLastSaveDirectory = async () => { - try { - if ("indexedDB" in window) { - const request = indexedDB.open("termix-dirs", 1); - return new Promise((resolve) => { - request.onsuccess = () => { - const db = request.result; - const transaction = db.transaction(["directories"], "readonly"); - const store = transaction.objectStore("directories"); - const getRequest = store.get("lastSaveDir"); - getRequest.onsuccess = () => - resolve(getRequest.result?.handle || null); - }; - request.onerror = () => resolve(null); - request.onupgradeneeded = () => { - const db = request.result; - if (!db.objectStoreNames.contains("directories")) { - db.createObjectStore("directories"); - } - }; - }); - } - } catch { - // IndexedDB not available or failed to retrieve directory - } - return null; - }; - const saveLastDirectory = async (fileHandle: any) => { try { if ("indexedDB" in window && fileHandle.getParent) {