Skip to content

Commit

Permalink
Place mobile-sync button in advanced-tab of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Mar 22, 2019
1 parent 2012e8a commit 1ac2880
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
31 changes: 30 additions & 1 deletion ui/app/pages/settings/advanced-tab/advanced-tab.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { exportAsFile } from '../../../helpers/utils/util'
import ToggleButton from 'react-toggle-button'
import TextField from '../../../components/ui/text-field'
import Button from '../../../components/ui/button'
import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes'

export default class AdvancedTab extends PureComponent {
static contextTypes = {
Expand Down Expand Up @@ -176,6 +177,33 @@ export default class AdvancedTab extends PureComponent {
}
}

renderMobileSync () {
const { t } = this.context
const { history } = this.props
//
return (
<div className="settings-page__content-row">
<div className="settings-page__content-item">
<span>{ t('syncWithMobile') }</span>
</div>
<div className="settings-page__content-item">
<div className="settings-page__content-item-col">
<Button
type="primary"
large
onClick={event => {
event.preventDefault()
history.push(MOBILE_SYNC_ROUTE)
}}
>
{ t('syncWithMobile') }
</Button>
</div>
</div>
</div>
)
}

renderStateLogs () {
const { t } = this.context
const { displayWarning } = this.props
Expand Down Expand Up @@ -334,8 +362,9 @@ export default class AdvancedTab extends PureComponent {
<div className="settings-page__body">
{ warning && <div className="settings-tab__error">{ warning }</div> }
{ this.renderStateLogs() }
{ this.renderResetAccount() }
{ this.renderMobileSync() }
{ this.renderNewRpcUrl() }
{ this.renderResetAccount() }
{ this.renderAdvancedGasInputInline() }
{ this.renderHexDataOptIn() }
{ this.renderShowConversionInTestnets() }
Expand Down
31 changes: 1 addition & 30 deletions ui/app/pages/settings/security-tab/security-tab.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { exportAsFile } from '../../../helpers/utils/util'
import ToggleButton from 'react-toggle-button'
import {REVEAL_SEED_ROUTE, MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes'
import { REVEAL_SEED_ROUTE } from '../../../helpers/constants/routes'
import Button from '../../../components/ui/button'

export default class SecurityTab extends PureComponent {
Expand Down Expand Up @@ -123,34 +123,6 @@ export default class SecurityTab extends PureComponent {
)
}


renderMobileSync () {
const { t } = this.context
const { history } = this.props

return (
<div className="settings-page__content-row">
<div className="settings-page__content-item">
<span>{ t('syncWithMobile') }</span>
</div>
<div className="settings-page__content-item">
<div className="settings-page__content-item-col">
<Button
type="primary"
large
onClick={event => {
event.preventDefault()
history.push(MOBILE_SYNC_ROUTE)
}}
>
{ t('syncWithMobile') }
</Button>
</div>
</div>
</div>
)
}

renderPrivacyOptIn () {
const { t } = this.context
const { privacyMode, setPrivacyMode } = this.props
Expand Down Expand Up @@ -212,7 +184,6 @@ export default class SecurityTab extends PureComponent {
{ this.renderPrivacyOptIn() }
{ this.renderClearApproval() }
{ this.renderSeedWords() }
{ this.renderMobileSync() }
{ this.renderMetaMetricsOptIn() }
</div>
)
Expand Down

0 comments on commit 1ac2880

Please sign in to comment.