Skip to content

Commit

Permalink
feat: add ipfs on path option (#1016)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Henrique Dias <[email protected]>
  • Loading branch information
hacdias authored and olizilla committed Apr 29, 2019
1 parent c5f3f03 commit 1bdb3eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@
"summary": "JavaScript error messages and stack traces",
"details": "Records JavaScript error messages and stack traces that occur while using the app, where possible. It is very helpful to know when the app is not working for you, but <1>error messages may include identifiable information</1> like CIDs or file paths, so only enable this if you are comfortable sharing that information with us."
}
}
},
"ipfsCmdTools": "IPFS command line tools",
"ipfsCmdToolsDescription": "Add <0>ipfs</0> binary to your system <0>PATH</0> so you can use it in the command line."
}
12 changes: 12 additions & 0 deletions src/settings/DesktopSettings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import os from 'os'
import { connect } from 'redux-bundler-react'
import { translate, Trans } from 'react-i18next'
import Box from '../components/box/Box'
Expand Down Expand Up @@ -56,6 +57,17 @@ export function DesktopSettings ({ t, doDesktopSettingsToggle, desktopSettings }
components={[<Key>0</Key>, <Key>0</Key>, <Key>0</Key>, <Key>0</Key>]} />
</p>
</CheckboxSetting>
<CheckboxSetting checked={desktopSettings['ipfsOnPath'] || false}
title={t('ipfsCmdTools')}
disabled={os.platform() === 'win32'}
onChange={() => doDesktopSettingsToggle('ipfsOnPath')}>
<p className='mb0 mt1 lh-copy'>
<Trans
i18nKey='ipfsCmdToolsDescription'
defaults='Add <0>ipfs</0> binary to your system <0>PATH</0> so you can use it in the command line.'
components={[<Key>0</Key>, <Key>0</Key>, <Key>0</Key>, <Key>0</Key>]} />
</p>
</CheckboxSetting>
</Box>
)
}
Expand Down

0 comments on commit 1bdb3eb

Please sign in to comment.