add dispatch functions to handle multiple files

pull/4767/head
Joseph Izang 7 months ago
parent 23fb65d696
commit a22733d251
  1. 14
      libs/remix-ui/workspace/src/lib/providers/FileSystemProvider.tsx

@ -201,10 +201,22 @@ export const FileSystemProvider = (props: WorkspaceProps) => {
await moveFile(src, dest)
}
const dispatchMoveFiles = async (src: string[], dest: string) => {
for (const path of src) {
await moveFile(path, dest)
}
}
const dispatchMoveFolder = async (src: string, dest: string) => {
await moveFolder(src, dest)
}
const dispatchMoveFolders = async (src: string[], dest: string) => {
for (const path of src) {
await moveFolder(path, dest)
}
}
const dispatchShowAllBranches = async () => {
await showAllBranches()
}
@ -367,7 +379,9 @@ export const FileSystemProvider = (props: WorkspaceProps) => {
dispatchHandleRestoreBackup,
dispatchCloneRepository,
dispatchMoveFile,
dispatchMoveFiles,
dispatchMoveFolder,
dispatchMoveFolders,
dispatchShowAllBranches,
dispatchSwitchToBranch,
dispatchCreateNewBranch,

Loading…
Cancel
Save