|
|
@ -8,7 +8,8 @@ import { browserReducer, browserInitialState } from '../reducers/workspace' |
|
|
|
import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, |
|
|
|
import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, |
|
|
|
deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, |
|
|
|
deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, |
|
|
|
fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile, handleDownloadFiles, restoreBackupZip, cloneRepository, moveFile, moveFolder, |
|
|
|
fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile, handleDownloadFiles, restoreBackupZip, cloneRepository, moveFile, moveFolder, |
|
|
|
showAllBranches |
|
|
|
showAllBranches, |
|
|
|
|
|
|
|
switchToBranch |
|
|
|
} from '../actions' |
|
|
|
} from '../actions' |
|
|
|
import { Modal, WorkspaceProps, WorkspaceTemplate } from '../types' |
|
|
|
import { Modal, WorkspaceProps, WorkspaceTemplate } from '../types' |
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
@ -143,6 +144,10 @@ export const FileSystemProvider = (props: WorkspaceProps) => { |
|
|
|
await showAllBranches() |
|
|
|
await showAllBranches() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dispatchSwitchToBranch = async (branch: string) => { |
|
|
|
|
|
|
|
await switchToBranch(branch) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
dispatchInitWorkspace() |
|
|
|
dispatchInitWorkspace() |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
@ -248,7 +253,8 @@ export const FileSystemProvider = (props: WorkspaceProps) => { |
|
|
|
dispatchCloneRepository, |
|
|
|
dispatchCloneRepository, |
|
|
|
dispatchMoveFile, |
|
|
|
dispatchMoveFile, |
|
|
|
dispatchMoveFolder, |
|
|
|
dispatchMoveFolder, |
|
|
|
dispatchShowAllBranches |
|
|
|
dispatchShowAllBranches, |
|
|
|
|
|
|
|
dispatchSwitchToBranch |
|
|
|
} |
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<FileSystemContext.Provider value={value}> |
|
|
|
<FileSystemContext.Provider value={value}> |
|
|
|