diff --git a/public/locales/en/app.json b/public/locales/en/app.json index dd2918a97..c40e0a833 100644 --- a/public/locales/en/app.json +++ b/public/locales/en/app.json @@ -30,7 +30,7 @@ "unselectAll": "Unselect all", "generate": "Generate", "publish": "Publish", - "downloadCar": "Download as CAR", + "downloadCar": "Export CAR", "done": "Done" }, "cliModal": { diff --git a/src/bundles/files/consts.js b/src/bundles/files/consts.js index aa6697d67..b13fa7a2a 100644 --- a/src/bundles/files/consts.js +++ b/src/bundles/files/consts.js @@ -131,6 +131,10 @@ export const cliCommandList = { * @param {string} path */ [cliCmdKeys.FROM_IPFS]: (path) => `ipfs files cp /ipfs/ "${path}/"`, + /** + * @param {string} path + */ + [cliCmdKeys.FROM_CAR]: (path) => `ipfs dag import file.car && ipfs files cp /ipfs/ "${path}/"`, [cliCmdKeys.ADD_NEW_PEER]: () => 'ipfs swarm connect ', /** * @param {string} ipfsPath diff --git a/src/files/file-input/FileInput.js b/src/files/file-input/FileInput.js index 26fea06ae..5f654740a 100644 --- a/src/files/file-input/FileInput.js +++ b/src/files/file-input/FileInput.js @@ -103,7 +103,8 @@ class FileInput extends React.Component { {t('addByPath')} - diff --git a/src/files/modals/Modals.js b/src/files/modals/Modals.js index 802aeceaf..e09348fa1 100644 --- a/src/files/modals/Modals.js +++ b/src/files/modals/Modals.js @@ -217,6 +217,7 @@ class Modals extends React.Component { case cliCmdKeys.ADD_DIRECTORY: case cliCmdKeys.CREATE_NEW_DIRECTORY: case cliCmdKeys.FROM_IPFS: + case cliCmdKeys.FROM_CAR: return cliCommandList[action](root.substring('/files'.length)) case cliCmdKeys.DELETE_FILE_FROM_IPFS: case cliCmdKeys.REMOVE_FILE_FROM_IPFS: