This commit is contained in:
David Baker 2019-01-18 18:43:40 +00:00
parent 970880737e
commit 630a6a479b
6 changed files with 20 additions and 19 deletions

View file

@ -186,7 +186,11 @@ export default class DeviceVerifyDialog extends React.Component {
_renderSasVerificationPhaseShowSas() {
const VerificationShowSas = sdk.getComponent('views.verification.VerificationShowSas');
return <VerificationShowSas sas={this._showSasEvent.sas} onCancel={this._onCancelClick} onDone={this._onSasMatchesClick} />
return <VerificationShowSas
sas={this._showSasEvent.sas}
onCancel={this._onCancelClick}
onDone={this._onSasMatchesClick}
/>;
}
_renderSasVerificationPhaseWaitForPartnerToConfirm() {
@ -201,12 +205,12 @@ export default class DeviceVerifyDialog extends React.Component {
_renderSasVerificationPhaseVerified() {
const VerificationComplete = sdk.getComponent('views.verification.VerificationComplete');
return <VerificationComplete onDone={this._onVerifiedDoneClick} />
return <VerificationComplete onDone={this._onVerifiedDoneClick} />;
}
_renderSasVerificationPhaseCancelled() {
const VerificationCancelled = sdk.getComponent('views.verification.VerificationCancelled');
return <VerificationCancelled onDone={this._onCancelClick} />
return <VerificationCancelled onDone={this._onCancelClick} />;
}
_renderLegacyVerification() {

View file

@ -16,10 +16,8 @@ limitations under the License.
import React from 'react';
import PropTypes from 'prop-types';
import MatrixClientPeg from '../../../MatrixClientPeg';
import sdk from '../../../index';
import { _t } from '../../../languageHandler';
import {verificationMethods} from 'matrix-js-sdk/lib/crypto';
const PHASE_START = 0;
const PHASE_SHOW_SAS = 1;
@ -102,13 +100,13 @@ export default class IncomingSasDialog extends React.Component {
<p>{_t(
"Verify this user to mark them as trusted. " +
"Trusting users gives you extra peace of mind when using " +
"end-to-end encrypted messages."
"end-to-end encrypted messages.",
)}</p>
<p>{_t(
// NB. Below wording adjusted to singular 'device' until we have
// cross-signing
"Verifying this user will mark their device as trusted, and " +
"also mark your device as trusted to them"
"also mark your device as trusted to them",
)}</p>
<DialogButtons
primaryButton={_t('Continue')}
@ -126,7 +124,7 @@ export default class IncomingSasDialog extends React.Component {
sas={this._showSasEvent.sas}
onCancel={this._onCancelClick}
onDone={this._onSasMatchesClick}
/>
/>;
}
_renderPhaseWaitForPartnerToConfirm() {
@ -142,12 +140,12 @@ export default class IncomingSasDialog extends React.Component {
_renderPhaseVerified() {
const VerificationComplete = sdk.getComponent('views.verification.VerificationComplete');
return <VerificationComplete onDone={this._onVerifiedDoneClick} />
return <VerificationComplete onDone={this._onVerifiedDoneClick} />;
}
_renderPhaseCancelled() {
const VerificationCancelled = sdk.getComponent('views.verification.VerificationCancelled');
return <VerificationCancelled onDone={this._onCancelClick} />
return <VerificationCancelled onDone={this._onCancelClick} />;
}
render() {

View file

@ -16,7 +16,6 @@ limitations under the License.
import React from "react";
import PropTypes from "prop-types";
import { _t } from '../../../languageHandler';
import classnames from 'classnames';
import sdk from '../../../index';
@ -40,15 +39,15 @@ class HexVerifyPair extends React.Component {
mx_HexVerify_pair_verified: this.props.verified,
};
const AccessibleButton = sdk.getComponent('views.elements.AccessibleButton');
return <AccessibleButton className={classnames(classNames)}
return <AccessibleButton className={classnames(classNames)}
onClick={this._onClick}
>
{this.props.text}
</AccessibleButton>
</AccessibleButton>;
}
}
/**
/*
* Helps a user verify a hexadecimal code matches one displayed
* elsewhere (eg. on a different device)
*/

View file

@ -37,4 +37,4 @@ export default class VerificationCancelled extends React.Component {
/>
</div>;
}
};
}

View file

@ -39,4 +39,4 @@ export default class VerificationComplete extends React.Component {
/>
</div>;
}
};
}

View file

@ -42,11 +42,11 @@ export default class VerificationShowSas extends React.Component {
const HexVerify = sdk.getComponent('views.elements.HexVerify');
return <div>
<p>{_t(
"Verify this user by confirming the following number appears on their screen"
"Verify this user by confirming the following number appears on their screen",
)}</p>
<p>{_t(
"For maximum security, we reccommend you do this in person or use another " +
"trusted means of communication"
"trusted means of communication",
)}</p>
<HexVerify text={this.props.sas}
onVerifiedStateChange={this._onVerifiedStateChange}
@ -62,4 +62,4 @@ export default class VerificationShowSas extends React.Component {
/>
</div>;
}
};
}