diff --git a/electron_app/src/clientManager.js b/electron_app/src/clientManager.js index 30b400fc0..5066a8ec7 100644 --- a/electron_app/src/clientManager.js +++ b/electron_app/src/clientManager.js @@ -153,6 +153,11 @@ class ClientManager { return checkDeviceRemoved(res); } + async resetPassword(recipientId) { + const res = await client.resetPassword(recipientId); + return checkDeviceRemoved(res); + } + async unlockDevice(params) { const res = await client.unlockDevice(params); return checkDeviceRemoved(res); diff --git a/email_dialog/src/components/Dialog.js b/email_dialog/src/components/Dialog.js index 90facd770..027f14612 100644 --- a/email_dialog/src/components/Dialog.js +++ b/email_dialog/src/components/Dialog.js @@ -3,27 +3,27 @@ import { remoteData, onResponseModal } from './../utils/electronInterface'; import * as messages from './../utils/contents'; import './dialog.css'; -const { title, contentType, options, sendTo } = remoteData; +const { title, contentType, options, sendTo, customTextToReplace } = remoteData; const Dialog = () => (

{title}

- {renderContent(contentType)} + {renderContent(customTextToReplace, contentType)} {renderOptions(options, sendTo)}
); -const renderContent = contentType => { +const renderContent = (customText, contentType) => { switch (contentType) { case 'EMPTY_RECOVERY_EMAIL': return messages.EmptyRecoveryEmail(); - case 'FORGOT_PASSWORD_SENT_LINK': - return messages.ForgotPasswordSentLink(); + case 'FORGOT_PASSWORD_SEND_LINK': + return messages.ForgotPasswordSentLink(customText); case 'FORGOT_PASSWORD_EMPTY_EMAIL': - return messages.ForgotPasswordEmptyEmail(); + return messages.ForgotPasswordEmptyEmail(customText); case 'PERMANENT_DELETE_THREAD': return messages.PermanentDeleteThread(); default: @@ -34,18 +34,22 @@ const renderContent = contentType => { const renderOptions = (options, sendTo) => { return (
- - + {options.cancelLabel && ( + + )} + {options.acceptLabel && ( + + )}
); }; diff --git a/email_dialog/src/components/dialog.scss b/email_dialog/src/components/dialog.scss index c7ec0090d..1f71c40dc 100644 --- a/email_dialog/src/components/dialog.scss +++ b/email_dialog/src/components/dialog.scss @@ -30,7 +30,7 @@ } .message-empty-recovery-email { - font-size: 13px; + font-size: 13.5px; position: relative; top: 10px; } @@ -40,7 +40,7 @@ top: 15px; } .message-forgot-sent-link { - font-size: 14px; + font-size: 15px; position: relative; top: 20px; p { @@ -62,6 +62,9 @@ position: absolute; bottom: 30px; .cancel { + position: absolute; + left: 5px; + bottom: 0px; border: none; outline: none; border-radius: 100px; @@ -77,6 +80,9 @@ } } .confirm { + position: absolute; + left: 190px; + bottom: 0px; border: none; outline: none; border-radius: 100px; diff --git a/email_dialog/src/utils/contents.js b/email_dialog/src/utils/contents.js index 83bdd6706..646124575 100644 --- a/email_dialog/src/utils/contents.js +++ b/email_dialog/src/utils/contents.js @@ -9,26 +9,33 @@ export const LostAllDevices = () => (
); -export const EmptyRecoveryEmail = () => ( -
-

- You did not set a Recovery Email so account recovery is - impossible if you forget your password. -

-

Proceed without recovery email?

-
-); +export const EmptyRecoveryEmail = () => { + return ( +
+

+ You did not set a Recovery Email so account recovery is + impossible if you forget your password. +

+
+ ); +}; -export const ForgotPasswordSentLink = () => ( -
-

A reset link will be sent to d******@o****l.com

-

The link will be valid for 1 hour

-
-); +export const ForgotPasswordSentLink = customText => { + const content = + customText || + `A reset link was sent to your Recovery email\nThe link will be valid for 30 min`; + return ( +
+

{content}

+
+ ); +}; -export const ForgotPasswordEmptyEmail = () => ( +export const ForgotPasswordEmptyEmail = customText => (
-

You need to set a Recovery Email to reset your password.

+

+ {customText || `You need to set a Recovery Email to reset your password`} +

); diff --git a/email_login/src/components/Login.js b/email_login/src/components/Login.js index c247d296f..ad6a3eb8b 100644 --- a/email_login/src/components/Login.js +++ b/email_login/src/components/Login.js @@ -27,21 +27,18 @@ const renderForm = props => (
-