Browse Source
-Added enter key trigger for password modal
-Added close buttons to technical data, share analytics, trade safely modals
develop
Juan Cortes Ross
6 years ago
No known key found for this signature in database
GPG Key ID: 34A99C03E9455EB8
5 changed files with
12 additions and
17 deletions
-
src/components/ManagerPage/AppsList.js
-
src/components/SettingsPage/PasswordForm.js
-
src/components/modals/Disclaimer.js
-
src/components/modals/ShareAnalytics.js
-
src/components/modals/TechnicalData.js
|
|
@ -1,7 +1,7 @@ |
|
|
|
// @flow
|
|
|
|
/* eslint-disable react/jsx-no-literals */ // FIXME
|
|
|
|
|
|
|
|
import React, { PureComponent, Fragment } from 'react' |
|
|
|
import React, { PureComponent } from 'react' |
|
|
|
import styled from 'styled-components' |
|
|
|
import { translate } from 'react-i18next' |
|
|
|
import { connect } from 'react-redux' |
|
|
@ -15,7 +15,6 @@ import { developerModeSelector } from 'reducers/settings' |
|
|
|
import installApp from 'commands/installApp' |
|
|
|
import uninstallApp from 'commands/uninstallApp' |
|
|
|
import Box from 'components/base/Box' |
|
|
|
import Space from 'components/base/Space' |
|
|
|
import Modal from 'components/base/Modal' |
|
|
|
import Tooltip from 'components/base/Tooltip' |
|
|
|
import Text from 'components/base/Text' |
|
|
|
|
|
@ -70,6 +70,7 @@ class PasswordForm extends PureComponent<Props> { |
|
|
|
</Label> |
|
|
|
<InputPassword |
|
|
|
style={{ width: 240 }} |
|
|
|
onEnter={onSubmit} |
|
|
|
id="confirmPassword" |
|
|
|
onChange={onChange('confirmPassword')} |
|
|
|
value={confirmPassword} |
|
|
|
|
|
@ -25,12 +25,14 @@ const mapDispatchToProps = { |
|
|
|
} |
|
|
|
|
|
|
|
class DisclaimerModal extends PureComponent<Props> { |
|
|
|
onClose = () => this.props.closeModal(MODAL_DISCLAIMER) |
|
|
|
render() { |
|
|
|
const { t } = this.props |
|
|
|
|
|
|
|
return ( |
|
|
|
<Modal name={MODAL_DISCLAIMER} centered> |
|
|
|
<ModalBody |
|
|
|
onClose={this.onClose} |
|
|
|
title={t('disclaimerModal.title')} |
|
|
|
render={() => ( |
|
|
|
<Box flow={4} ff="Open Sans|Regular" fontSize={4} color="smoke"> |
|
|
@ -43,11 +45,7 @@ class DisclaimerModal extends PureComponent<Props> { |
|
|
|
)} |
|
|
|
renderFooter={() => ( |
|
|
|
<Box horizontal justifyContent="flex-end"> |
|
|
|
<Button |
|
|
|
data-e2e="continue_button" |
|
|
|
onClick={() => this.props.closeModal(MODAL_DISCLAIMER)} |
|
|
|
primary |
|
|
|
> |
|
|
|
<Button data-e2e="continue_button" onClick={this.onClose} primary> |
|
|
|
{t('disclaimerModal.cta')} |
|
|
|
</Button> |
|
|
|
</Box> |
|
|
|
|
|
@ -24,6 +24,7 @@ const mapDispatchToProps = { |
|
|
|
} |
|
|
|
|
|
|
|
class ShareAnalytics extends PureComponent<Props, *> { |
|
|
|
onClose = () => this.props.closeModal(MODAL_SHARE_ANALYTICS) |
|
|
|
render() { |
|
|
|
const { t } = this.props |
|
|
|
const items = [ |
|
|
@ -67,6 +68,7 @@ class ShareAnalytics extends PureComponent<Props, *> { |
|
|
|
return ( |
|
|
|
<Modal name={MODAL_SHARE_ANALYTICS} centered> |
|
|
|
<ModalBody |
|
|
|
onClose={this.onClose} |
|
|
|
title={t('onboarding.analytics.shareAnalytics.title')} |
|
|
|
render={() => ( |
|
|
|
<Fragment> |
|
|
@ -78,11 +80,7 @@ class ShareAnalytics extends PureComponent<Props, *> { |
|
|
|
)} |
|
|
|
renderFooter={() => ( |
|
|
|
<Fragment> |
|
|
|
<Button |
|
|
|
onClick={() => this.props.closeModal(MODAL_SHARE_ANALYTICS)} |
|
|
|
primary |
|
|
|
data-e2e="modal_buttonClose_shareAnalytics" |
|
|
|
> |
|
|
|
<Button onClick={this.onClose} primary data-e2e="modal_buttonClose_shareAnalytics"> |
|
|
|
{t('common.close')} |
|
|
|
</Button> |
|
|
|
</Fragment> |
|
|
|
|
|
@ -23,6 +23,8 @@ const mapDispatchToProps = { |
|
|
|
} |
|
|
|
|
|
|
|
class TechnicalData extends PureComponent<Props, *> { |
|
|
|
onClose = () => this.props.closeModal(MODAL_TECHNICAL_DATA) |
|
|
|
|
|
|
|
render() { |
|
|
|
const { t } = this.props |
|
|
|
|
|
|
@ -44,6 +46,7 @@ class TechnicalData extends PureComponent<Props, *> { |
|
|
|
return ( |
|
|
|
<Modal name={MODAL_TECHNICAL_DATA} centered> |
|
|
|
<ModalBody |
|
|
|
onClose={this.onClose} |
|
|
|
title={t('onboarding.analytics.technicalData.mandatoryContextual.title')} |
|
|
|
render={() => ( |
|
|
|
<Fragment> |
|
|
@ -55,11 +58,7 @@ class TechnicalData extends PureComponent<Props, *> { |
|
|
|
)} |
|
|
|
renderFooter={() => ( |
|
|
|
<Fragment> |
|
|
|
<Button |
|
|
|
onClick={() => this.props.closeModal(MODAL_TECHNICAL_DATA)} |
|
|
|
primary |
|
|
|
data-e2e="modal_buttonClose_techData" |
|
|
|
> |
|
|
|
<Button onClick={this.onClose} primary data-e2e="modal_buttonClose_techData"> |
|
|
|
{t('common.close')} |
|
|
|
</Button> |
|
|
|
</Fragment> |
|
|
|