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

View file

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

View file

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

View file

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

View file

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

View file

@ -42,11 +42,11 @@ export default class VerificationShowSas extends React.Component {
const HexVerify = sdk.getComponent('views.elements.HexVerify'); const HexVerify = sdk.getComponent('views.elements.HexVerify');
return <div> return <div>
<p>{_t( <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>
<p>{_t( <p>{_t(
"For maximum security, we reccommend you do this in person or use another " + "For maximum security, we reccommend you do this in person or use another " +
"trusted means of communication" "trusted means of communication",
)}</p> )}</p>
<HexVerify text={this.props.sas} <HexVerify text={this.props.sas}
onVerifiedStateChange={this._onVerifiedStateChange} onVerifiedStateChange={this._onVerifiedStateChange}
@ -62,4 +62,4 @@ export default class VerificationShowSas extends React.Component {
/> />
</div>; </div>;
} }
}; }