|
|
|
@ -5,7 +5,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line |
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
|
import { FileSystemContext } from '../contexts' |
|
|
|
|
import { browserReducer, browserInitialState } from '../reducers/workspace' |
|
|
|
|
import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile, handleDownloadFiles } from '../actions' |
|
|
|
|
import { initWorkspace, fetchDirectory, removeInputField, deleteWorkspace, clearPopUp, publishToGist, createNewFile, setFocusElement, createNewFolder, deletePath, renamePath, copyFile, copyFolder, runScript, emitContextMenuEvent, handleClickFile, handleExpandPath, addInputField, createWorkspace, fetchWorkspaceDirectory, renameWorkspace, switchToWorkspace, uploadFile, handleDownloadFiles, restoreBackupZip } from '../actions' |
|
|
|
|
import { Modal, WorkspaceProps } from '../types' |
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
|
import { Workspace } from '../remix-ui-workspace' |
|
|
|
@ -119,6 +119,10 @@ export const FileSystemProvider = (props: WorkspaceProps) => { |
|
|
|
|
await handleDownloadFiles() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const dispatchHandleRestoreBackup = async () => { |
|
|
|
|
await restoreBackupZip() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
dispatchInitWorkspace() |
|
|
|
|
}, []) |
|
|
|
@ -219,7 +223,8 @@ export const FileSystemProvider = (props: WorkspaceProps) => { |
|
|
|
|
dispatchEmitContextMenuEvent, |
|
|
|
|
dispatchHandleClickFile, |
|
|
|
|
dispatchHandleExpandPath, |
|
|
|
|
dispatchHandleDownloadFiles |
|
|
|
|
dispatchHandleDownloadFiles, |
|
|
|
|
dispatchHandleRestoreBackup |
|
|
|
|
} |
|
|
|
|
return ( |
|
|
|
|
<FileSystemContext.Provider value={value}> |
|
|
|
|