pull/4084/head
filip mertens 1 year ago committed by bunsenstraat
parent 350d5a0ba7
commit ecf171fa83
  1. 39
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx

@ -290,41 +290,40 @@ export const FileExplorer = (props: FileExplorerProps) => {
} }
const handleFileMove = (dest: string, src: string) => { const handleFileMove = (dest: string, src: string) => {
try{ try {
props.modal( props.modal(
intl.formatMessage({id: 'filePanel.moveFile'}), intl.formatMessage({ id: 'filePanel.moveFile' }),
intl.formatMessage({id: 'filePanel.moveFileMsg1'}, {src, dest}), intl.formatMessage({ id: 'filePanel.moveFileMsg1' }, { src, dest }),
intl.formatMessage({id: 'filePanel.yes'}), intl.formatMessage({ id: 'filePanel.yes' }),
() => props.dispatchMoveFile(src, dest), () => props.dispatchMoveFile(src, dest),
intl.formatMessage({id: 'filePanel.cancel'}), intl.formatMessage({ id: 'filePanel.cancel' }),
() => {} () => {}
) )
} catch (error) { } catch (error) {
props.modal( props.modal(
intl.formatMessage({id: 'filePanel.movingFileFailed'}), intl.formatMessage({ id: 'filePanel.movingFileFailed' }),
intl.formatMessage({id: 'filePanel.movingFileFailedMsg'}, {src}), intl.formatMessage({ id: 'filePanel.movingFileFailedMsg' }, { src }),
intl.formatMessage({id: 'filePanel.close'}), intl.formatMessage({ id: 'filePanel.close' }),
async () => {} async () => {}
) )
} }
} }
const handleFolderMove = (dest: string, src: string) => { const handleFolderMove = (dest: string, src: string) => {
try { try {
props.modal( props.modal(
intl.formatMessage({id: 'filePanel.moveFile'}), intl.formatMessage({ id: 'filePanel.moveFile' }),
intl.formatMessage({id: 'filePanel.moveFileMsg1'}, {src, dest}), intl.formatMessage({ id: 'filePanel.moveFileMsg1' }, { src, dest }),
intl.formatMessage({id: 'filePanel.yes'}), intl.formatMessage({ id: 'filePanel.yes' }),
() => props.dispatchMoveFolder(src, dest), () => props.dispatchMoveFolder(src, dest),
intl.formatMessage({id: 'filePanel.cancel'}), intl.formatMessage({ id: 'filePanel.cancel' }),
() => {} () => {}
) )
} catch (error) { } catch (error) {
props.modal( props.modal(
intl.formatMessage({id: 'filePanel.movingFolderFailed'}), intl.formatMessage({ id: 'filePanel.movingFolderFailed' }),
intl.formatMessage({id: 'filePanel.movingFolderFailedMsg'}, {src}), intl.formatMessage({ id: 'filePanel.movingFolderFailedMsg' }, { src }),
intl.formatMessage({id: 'filePanel.close'}), intl.formatMessage({ id: 'filePanel.close' }),
async () => {} async () => {}
) )
} }

Loading…
Cancel
Save