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

Loading…
Cancel
Save