Skip to content

Commit

Permalink
fix: do not show api address form on Desktop (#1835)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
  • Loading branch information
hacdias authored Sep 2, 2021
1 parent 675564e commit 149e003
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/settings/SettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { cliCmdKeys, cliCommandList } from '../bundles/files/consts'
const PAUSE_AFTER_SAVE_MS = 3000

export const SettingsPage = ({
t, tReady, isIpfsConnected, ipfsPendingFirstConnection,
t, tReady, isIpfsConnected, ipfsPendingFirstConnection, isIpfsDesktop,
isConfigBlocked, isLoading, isSaving, arePinningServicesSupported,
hasSaveFailed, hasSaveSucceded, hasErrors, hasLocalChanges, hasExternalChanges,
config, onChange, onReset, onSave, editorKey, analyticsEnabled, doToggleAnalytics,
Expand All @@ -49,15 +49,17 @@ export const SettingsPage = ({
</div>
: null }

<Box className='mb3 pa4-l pa2 joyride-settings-customapi'>
<div className='lh-copy charcoal'>
<Title>{t('app:terms.apiAddress')}</Title>
<Trans i18nKey='apiDescription' t={t}>
<p>If your node is configured with a <a className='link blue' href='https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addresses' target='_blank' rel='noopener noreferrer'>custom API address</a>, including a port other than the default 5001, enter it here.</p>
</Trans>
<ApiAddressForm/>
</div>
</Box>
{ isIpfsDesktop
? null
: <Box className='mb3 pa4-l pa2 joyride-settings-customapi'>
<div className='lh-copy charcoal'>
<Title>{t('app:terms.apiAddress')}</Title>
<Trans i18nKey='apiDescription' t={t}>
<p>If your node is configured with a <a className='link blue' href='https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addresses' target='_blank' rel='noopener noreferrer'>custom API address</a>, including a port other than the default 5001, enter it here.</p>
</Trans>
<ApiAddressForm/>
</div>
</Box> }

<Box className='mb3 pa4-l pa2'>
<div className='lh-copy charcoal'>
Expand Down

0 comments on commit 149e003

Please sign in to comment.