|
|
@ -5,7 +5,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line |
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
import { FileSystemContext } from '../contexts' |
|
|
|
import { FileSystemContext } from '../contexts' |
|
|
|
import { browserReducer, browserInitialState } from '../reducers/workspace' |
|
|
|
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, restoreBackupZip } 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, cloneRepository } 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
|
|
|
|
import { Workspace } from '../remix-ui-workspace' |
|
|
|
import { Workspace } from '../remix-ui-workspace' |
|
|
@ -123,6 +123,10 @@ export const FileSystemProvider = (props: WorkspaceProps) => { |
|
|
|
await restoreBackupZip() |
|
|
|
await restoreBackupZip() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dispatchCloneRepository = async (url: string) => { |
|
|
|
|
|
|
|
await cloneRepository(url) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
dispatchInitWorkspace() |
|
|
|
dispatchInitWorkspace() |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
@ -224,7 +228,8 @@ export const FileSystemProvider = (props: WorkspaceProps) => { |
|
|
|
dispatchHandleClickFile, |
|
|
|
dispatchHandleClickFile, |
|
|
|
dispatchHandleExpandPath, |
|
|
|
dispatchHandleExpandPath, |
|
|
|
dispatchHandleDownloadFiles, |
|
|
|
dispatchHandleDownloadFiles, |
|
|
|
dispatchHandleRestoreBackup |
|
|
|
dispatchHandleRestoreBackup, |
|
|
|
|
|
|
|
dispatchCloneRepository |
|
|
|
} |
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<FileSystemContext.Provider value={value}> |
|
|
|
<FileSystemContext.Provider value={value}> |
|
|
|