From c7c72e50bb86ecd1a73779e554beead846f48b3c Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 25 Mar 2020 14:46:14 +1100 Subject: [PATCH] lint --- _locales/en/messages.json | 6 ++++-- ts/components/session/SessionPasswordModal.tsx | 11 ++++++++--- ts/components/session/SessionPasswordPrompt.tsx | 9 +++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 21c0b9157..e8ab82436 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2297,8 +2297,10 @@ "message": "Confirm password" }, "pasteLongPasswordToastTitle": { - "message": "The clipboard content exceeds the maximum password length of $max_pwd_len$ characters.", - "description": "Shown when user pastes a password which is longer than MAX_PASSWORD_LEN" + "message": + "The clipboard content exceeds the maximum password length of $max_pwd_len$ characters.", + "description": + "Shown when user pastes a password which is longer than MAX_PASSWORD_LEN" }, "showSeedPasswordRequest": { "message": "Please enter your password", diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index 9d58f742a..3c415df5a 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -197,9 +197,14 @@ export class SessionPasswordModal extends React.Component { private onPaste(event: any) { const clipboard = event.clipboardData.getData('text'); - if (clipboard.length > window.CONSTANTS.MAX_PASSWORD_LENGTH){ - const title = String(window.i18n('pasteLongPasswordToastTitle', window.CONSTANTS.MAX_PASSWORD_LENGTH)); - + if (clipboard.length > window.CONSTANTS.MAX_PASSWORD_LENGTH) { + const title = String( + window.i18n( + 'pasteLongPasswordToastTitle', + window.CONSTANTS.MAX_PASSWORD_LENGTH + ) + ); + window.pushToast({ title, type: 'warning', diff --git a/ts/components/session/SessionPasswordPrompt.tsx b/ts/components/session/SessionPasswordPrompt.tsx index 07fe70aa8..4ef1ae48d 100644 --- a/ts/components/session/SessionPasswordPrompt.tsx +++ b/ts/components/session/SessionPasswordPrompt.tsx @@ -126,9 +126,14 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> { public onPaste(event: any) { const clipboard = event.clipboardData.getData('text'); - if (clipboard.length > window.CONSTANTS.MAX_PASSWORD_LENGTH){ + if (clipboard.length > window.CONSTANTS.MAX_PASSWORD_LENGTH) { this.setState({ - error: String(window.i18n('pasteLongPasswordToastTitle', window.CONSTANTS.MAX_PASSWORD_LENGTH)) + error: String( + window.i18n( + 'pasteLongPasswordToastTitle', + window.CONSTANTS.MAX_PASSWORD_LENGTH + ) + ), }); }