From 6e447d12815d5c73a9c466c1259c23ee0b55a437 Mon Sep 17 00:00:00 2001 From: erikaperugachi Date: Wed, 14 Aug 2019 10:48:33 -0500 Subject: [PATCH 1/4] Enable forgot password link. Close #1131 --- email_mailbox/src/components/SettingAccount.js | 2 ++ email_mailbox/src/containers/Settings.js | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/email_mailbox/src/components/SettingAccount.js b/email_mailbox/src/components/SettingAccount.js index 012307dd8..1d15bdb9d 100644 --- a/email_mailbox/src/components/SettingAccount.js +++ b/email_mailbox/src/components/SettingAccount.js @@ -69,6 +69,7 @@ const SettingAccount = props => ( onClickChangeRecoveryEmailInputType={ props.onClickChangeRecoveryEmailInputType } + onClickForgotPasswordLink={props.onClickForgotPasswordLink} onClosePopup={props.onClosePopup} onConfirmChangePassword={props.onConfirmChangePassword} onConfirmChangeRecoveryEmail={props.onConfirmChangeRecoveryEmail} @@ -351,6 +352,7 @@ SettingAccount.propTypes = { onChangeInputValueOnSetReplyTo: PropTypes.func, onClearPopupParams: PropTypes.func, onClickChangeRecoveryEmailInputType: PropTypes.func, + onClickForgotPasswordLink: PropTypes.func, onClosePopup: PropTypes.func, onConfirmChangePassword: PropTypes.func, onConfirmChangeRecoveryEmail: PropTypes.func, diff --git a/email_mailbox/src/containers/Settings.js b/email_mailbox/src/containers/Settings.js index 92910467b..46bb40519 100644 --- a/email_mailbox/src/containers/Settings.js +++ b/email_mailbox/src/containers/Settings.js @@ -139,8 +139,12 @@ const mapDispatchToProps = dispatch => { dispatch(updateLabel(params)); }, onResetPassword: async () => { - const { recipientId } = myAccount; - const { status } = await resetPassword(recipientId); + const [recipientId, domain] = myAccount.recipientId.split('@'); + const params = { + recipientId, + domain: domain || appDomain + }; + const { status } = await resetPassword(params); if (status === 200) { sendResetPasswordSendLinkSuccessMessage(); return; From 99ea6c756c74fef71f6c64d8ae55f378fb60fc99 Mon Sep 17 00:00:00 2001 From: erikaperugachi Date: Wed, 14 Aug 2019 11:08:05 -0500 Subject: [PATCH 2/4] Fix open settings when labels menu is open. Fix #1131 --- email_mailbox/src/components/HeaderMainWrapper.js | 8 +++++--- email_mailbox/src/components/SideBar.js | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/email_mailbox/src/components/HeaderMainWrapper.js b/email_mailbox/src/components/HeaderMainWrapper.js index ee04deb94..e00570ecb 100644 --- a/email_mailbox/src/components/HeaderMainWrapper.js +++ b/email_mailbox/src/components/HeaderMainWrapper.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import HeaderMain from './HeaderMain'; +import { LabelType } from '../utils/electronInterface'; class HeaderMainWrapper extends Component { constructor(props) { @@ -39,7 +40,9 @@ class HeaderMainWrapper extends Component { } componentDidMount() { - const text = this.props.sectionSelected.params.searchParams.text; + const text = this.props.sectionSelected.params.searchParams + ? this.props.sectionSelected.params.searchParams.text + : false; const stateText = this.state.searchParams.text; if (text && !stateText) { this.setState(state => { @@ -56,10 +59,9 @@ class HeaderMainWrapper extends Component { return this.handleClearSearchInput(); } if (!prevProps.sectionSelected) return; - const searchMailboxId = -2; const prevMailboxId = prevProps.sectionSelected.params.mailboxSelected.id; const nextMailboxId = this.props.sectionSelected.params.mailboxSelected.id; - const prevMailboxIsSearch = prevMailboxId === searchMailboxId; + const prevMailboxIsSearch = prevMailboxId === LabelType.search.id; const nextMailboxIsDifferent = prevMailboxId !== nextMailboxId; if (prevMailboxIsSearch && nextMailboxIsDifferent) { return this.handleClearSearchInput(); diff --git a/email_mailbox/src/components/SideBar.js b/email_mailbox/src/components/SideBar.js index d58ce1749..2c2d51412 100644 --- a/email_mailbox/src/components/SideBar.js +++ b/email_mailbox/src/components/SideBar.js @@ -111,7 +111,9 @@ const renderLabels = (showLabels, labels, mailboxSelected, onClickSection) => (