pull/1005/head
Vincent 5 years ago
parent d6a48b9f6d
commit c7c72e50bb

@ -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",

@ -197,9 +197,14 @@ export class SessionPasswordModal extends React.Component<Props, State> {
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',

@ -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
)
),
});
}

Loading…
Cancel
Save