Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ipfs on path option #1016

Merged
merged 2 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion public/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,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