Revert "Updated formatting."

This reverts commit 6b40428ad9.
pull/1587/head
Warrick Corfe-Tan 5 years ago
parent 6b40428ad9
commit 56b8dfacc1

@ -37,7 +37,7 @@ class SessionPasswordModalInner extends React.Component<Props, State> {
error: null, error: null,
currentPasswordEntered: null, currentPasswordEntered: null,
currentPasswordConfirmEntered: null, currentPasswordConfirmEntered: null,
currentPasswordRetypeEntered: null, currentPasswordRetypeEntered: null
}; };
this.showError = this.showError.bind(this); this.showError = this.showError.bind(this);
@ -61,11 +61,7 @@ class SessionPasswordModalInner extends React.Component<Props, State> {
const { action, onOk } = this.props; const { action, onOk } = this.props;
const placeholders = const placeholders =
action === PasswordAction.Change 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')]; : [window.i18n('enterPassword'), window.i18n('confirmPassword')];
const confirmButtonColor = const confirmButtonColor =
@ -200,11 +196,7 @@ class SessionPasswordModalInner extends React.Component<Props, State> {
this.closeDialog(); this.closeDialog();
} }
private async handleActionChange( private async handleActionChange(oldPassword: string, newPassword: string, newConfirmedPassword: string) {
oldPassword: string,
newPassword: string,
newConfirmedPassword: string
) {
// We don't validate oldPassword on change: this is validate on the validatePasswordHash below // We don't validate oldPassword on change: this is validate on the validatePasswordHash below
// we only validate the newPassword here // we only validate the newPassword here
if (!this.validatePassword(newPassword)) { if (!this.validatePassword(newPassword)) {
@ -214,9 +206,9 @@ class SessionPasswordModalInner extends React.Component<Props, State> {
// Check the retyped password matches the new password // Check the retyped password matches the new password
if (newPassword !== newConfirmedPassword) { if (newPassword !== newConfirmedPassword) {
this.setState({ this.setState({
error: window.i18n('passwordsDoNotMatch'), error: window.i18n('passwordsDoNotMatch')
}); })
return; return
} }
const isValidWithStoredInDB = Boolean( const isValidWithStoredInDB = Boolean(
@ -270,7 +262,7 @@ class SessionPasswordModalInner extends React.Component<Props, State> {
const { const {
currentPasswordEntered, currentPasswordEntered,
currentPasswordConfirmEntered, currentPasswordConfirmEntered,
currentPasswordRetypeEntered, currentPasswordRetypeEntered
} = this.state; } = this.state;
const { Set, Remove, Change } = PasswordAction; const { Set, Remove, Change } = PasswordAction;

@ -288,9 +288,6 @@ export class SessionConversation extends React.Component<Props, State> {
const isPublic = selectedConversation.isPublic || false; const isPublic = selectedConversation.isPublic || false;
const isPrivate = selectedConversation.type === 'direct'; const isPrivate = selectedConversation.type === 'direct';
// debugger;
return ( return (
<SessionTheme theme={this.props.theme}> <SessionTheme theme={this.props.theme}>
<div className="conversation-header">{this.renderHeader()}</div> <div className="conversation-header">{this.renderHeader()}</div>

Loading…
Cancel
Save