Files
Netcatty/components/sftp/SftpPaneTreeView.types.ts
T
jinshenganyuciandbincxz 6527d5596f feat(sftp): stream packed downloads and restore folders locally (#4179)
* feat(sftp): stream packed downloads and restore selected folders locally

* fix(sftp): address packed download lifecycle and cleanup review

* fix(sftp): preserve live packed state across window reload and fall back on POSIX special child names

* fix(sftp): guard active-packed snapshot replay race and fall back on selected root symlinks

* fix(sftp): fall back before nested-link containment check for selected root symlinks

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:52:54 +08:00

40 lines
2.2 KiB
TypeScript

import type { SftpFileEntry } from '../../types';
import type { SftpPane } from '../../application/state/sftp/types';
import type { SftpTransferSource } from './SftpContext';
import type { UseSftpPaneSortingResult } from '../../application/state/sftp/useSftpPaneSorting';
export interface SftpPaneTreeViewProps {
pane: SftpPane;
side: 'left' | 'right';
onPrepareSelection: () => void;
onLoadChildren: (path: string) => Promise<SftpFileEntry[]>;
onMoveEntriesToPath: (sourcePaths: string[], targetPath: string) => Promise<void>;
onNavigateUp: () => void;
onNavigateTo: (path: string) => void;
onRefresh: () => void;
onOpenEntry: (entry: SftpFileEntry, fullPath?: string) => void;
onDragStart: (files: SftpTransferSource[], side: 'left' | 'right') => void;
onDragEnd: () => void;
openRenameDialog: (entryPath: string) => void;
openDeleteConfirm: (targets: string[]) => void;
onCopyToOtherPane: (files: SftpTransferSource[]) => void;
onDuplicateEntries?: (files: SftpTransferSource[]) => void;
onReceiveFromOtherPane: (files: SftpTransferSource[]) => void;
onOpenFileWithSystemDefault?: (entry: SftpFileEntry, fullPath?: string) => void;
onOpenFileWith?: (entry: SftpFileEntry, fullPath?: string) => void;
onEditFile?: (entry: SftpFileEntry, fullPath?: string) => void;
onDownloadFile?: (entry: SftpFileEntry, fullPath?: string) => void;
onDownloadFiles?: (entries: SftpFileEntry[], fullPaths?: string[]) => void;
onExtractArchive?: (entry: SftpFileEntry, fullPath?: string) => void | Promise<void>;
onCreateArchive?: (sourcePaths: string[]) => void;
onEditPermissions?: (entry: SftpFileEntry, fullPath?: string) => void;
draggedFiles: (SftpTransferSource & { side: 'left' | 'right' })[] | null;
openNewFolderDialog: (targetPath: string) => void;
openNewFileDialog: (targetPath: string) => void;
onUploadExternalFiles?: (dataTransfer: DataTransfer, targetPath?: string) => Promise<void>;
onUploadExternalFileList?: (fileList: FileList, targetPath?: string) => Promise<void>;
onUploadExternalFolder?: (targetPath?: string) => Promise<void>;
sorting: UseSftpPaneSortingResult;
reloadRequest: { token: number; paths?: string[]; full?: boolean };
}