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

WIP: Feat/backend toggle switch for desktop settings #895

Closed
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
16 changes: 16 additions & 0 deletions src/settings/DesktopSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
const altKey = isMac ? '⌥ option' : 'ALT'
const ctrlKey = isMac ? '⌘ command' : 'CTRL'

const isJavascript = (value) => {
return value === 'js'
}

const CheckboxSetting = ({ children, title, ...props }) => (
<div className='mt2'>
<div className='flex items-center'>
Expand All @@ -28,6 +32,7 @@ const Key = ({ children }) => <span className='monospace br2 bg-snow ph1'>{ chil

export function DesktopSettings ({ t, doDesktopSettingsToggle, desktopSettings }) {
return (
<div>
<Box className='mb3 pa4'>
<Title>{t('ipfsDesktop')}</Title>

Expand Down Expand Up @@ -57,6 +62,17 @@ export function DesktopSettings ({ t, doDesktopSettingsToggle, desktopSettings }
</p>
</CheckboxSetting>
</Box>
<Box className='mb3 pa4'>
<span>
<CheckboxSetting checked={isJavascript(desktopSettings['type']) || false }
title={t('IPFS Implementation')}
onChange={() => doDesktopSettingsToggle('type')}>
<p className='mb0 mt1 lh-copy'> Enable Javascript </p>
</CheckboxSetting>
<p> The javascript implementation does not yet have feature parity with the go implementation. For more info please see: </p>
</span>
</Box>
</div>
)
}

Expand Down