From 6b40428ad9fc7146e21804259479307003a94a48 Mon Sep 17 00:00:00 2001 From: Warrick Corfe-Tan Date: Tue, 4 May 2021 12:42:46 +1000 Subject: [PATCH] Updated formatting. --- .../session/SessionPasswordModal.tsx | 22 +++++++++++++------ .../conversation/SessionConversation.tsx | 3 +++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ts/components/session/SessionPasswordModal.tsx b/ts/components/session/SessionPasswordModal.tsx index fc50b860e..f35f59f95 100644 --- a/ts/components/session/SessionPasswordModal.tsx +++ b/ts/components/session/SessionPasswordModal.tsx @@ -37,7 +37,7 @@ class SessionPasswordModalInner extends React.Component { error: null, currentPasswordEntered: null, currentPasswordConfirmEntered: null, - currentPasswordRetypeEntered: null + currentPasswordRetypeEntered: null, }; this.showError = this.showError.bind(this); @@ -61,7 +61,11 @@ class SessionPasswordModalInner extends React.Component { const { action, onOk } = this.props; const placeholders = action === PasswordAction.Change - ? [window.i18n('typeInOldPassword'), window.i18n('enterPassword'), window.i18n('confirmPassword')] + ? [ + window.i18n('typeInOldPassword'), + window.i18n('enterPassword'), + window.i18n('confirmPassword'), + ] : [window.i18n('enterPassword'), window.i18n('confirmPassword')]; const confirmButtonColor = @@ -196,7 +200,11 @@ class SessionPasswordModalInner extends React.Component { this.closeDialog(); } - private async handleActionChange(oldPassword: string, newPassword: string, newConfirmedPassword: string) { + private async handleActionChange( + oldPassword: string, + newPassword: string, + newConfirmedPassword: string + ) { // We don't validate oldPassword on change: this is validate on the validatePasswordHash below // we only validate the newPassword here if (!this.validatePassword(newPassword)) { @@ -206,9 +214,9 @@ class SessionPasswordModalInner extends React.Component { // Check the retyped password matches the new password if (newPassword !== newConfirmedPassword) { this.setState({ - error: window.i18n('passwordsDoNotMatch') - }) - return + error: window.i18n('passwordsDoNotMatch'), + }); + return; } const isValidWithStoredInDB = Boolean( @@ -262,7 +270,7 @@ class SessionPasswordModalInner extends React.Component { const { currentPasswordEntered, currentPasswordConfirmEntered, - currentPasswordRetypeEntered + currentPasswordRetypeEntered, } = this.state; const { Set, Remove, Change } = PasswordAction; diff --git a/ts/components/session/conversation/SessionConversation.tsx b/ts/components/session/conversation/SessionConversation.tsx index 437cc7119..1d3fc17ac 100644 --- a/ts/components/session/conversation/SessionConversation.tsx +++ b/ts/components/session/conversation/SessionConversation.tsx @@ -288,6 +288,9 @@ export class SessionConversation extends React.Component { const isPublic = selectedConversation.isPublic || false; const isPrivate = selectedConversation.type === 'direct'; + + // debugger; + return (
{this.renderHeader()}