mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
post-merge fix
This commit is contained in:
parent
342fcb09c4
commit
b67256c7c2
@ -196,7 +196,7 @@ export default class RightPanel extends React.Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
panel = <UserInfo
|
panel = <UserInfo
|
||||||
userId={this.state.member}
|
user={this.state.member}
|
||||||
roomId={this.props.roomId}
|
roomId={this.props.roomId}
|
||||||
key={this.props.roomId || this.state.member.userId}
|
key={this.props.roomId || this.state.member.userId}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
@ -217,7 +217,7 @@ export default class RightPanel extends React.Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
panel = <UserInfo
|
panel = <UserInfo
|
||||||
userId={this.state.member}
|
user={this.state.member}
|
||||||
groupId={this.props.groupId}
|
groupId={this.props.groupId}
|
||||||
key={this.state.member.userId}
|
key={this.state.member.userId}
|
||||||
onClose={onClose} />;
|
onClose={onClose} />;
|
||||||
|
@ -19,7 +19,6 @@ import React from 'react';
|
|||||||
import * as sdk from '../../../index';
|
import * as sdk from '../../../index';
|
||||||
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
|
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
|
||||||
import VerificationQRCode from "../elements/crypto/VerificationQRCode";
|
import VerificationQRCode from "../elements/crypto/VerificationQRCode";
|
||||||
import {VerificationRequest} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
|
|
||||||
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||||
import {_t} from "../../../languageHandler";
|
import {_t} from "../../../languageHandler";
|
||||||
import E2EIcon from "../rooms/E2EIcon";
|
import E2EIcon from "../rooms/E2EIcon";
|
||||||
@ -32,9 +31,26 @@ export default class VerificationPanel extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderQRPhase() {
|
renderQRPhase() {
|
||||||
const {member} = this.props;
|
const {member, request} = this.props; // type req: VerificationRequest
|
||||||
// TODO change the button into a spinner when on click
|
// TODO change the button into a spinner when on click
|
||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
|
|
||||||
|
if (!request.requestEvent || !request.requestEvent.getId()) {
|
||||||
|
// TODO handle this error case
|
||||||
|
return <p>request.requestEvent.getId()</p>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const qrCodeKeys = [
|
||||||
|
[MatrixClientPeg.get().getDeviceId(), MatrixClientPeg.get().getDeviceEd25519Key()],
|
||||||
|
[MatrixClientPeg.get().getCrossSigningId(), MatrixClientPeg.get().getCrossSigningId()],
|
||||||
|
];
|
||||||
|
const crossSigningInfo = MatrixClientPeg.get().getStoredCrossSigningForUser(request.otherUserId);
|
||||||
|
|
||||||
|
if (!crossSigningInfo) {
|
||||||
|
// TODO handle this error case
|
||||||
|
return <p>crossSigningInfo</p>;
|
||||||
|
}
|
||||||
|
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
<div className="mx_UserInfo_container">
|
<div className="mx_UserInfo_container">
|
||||||
<h3>Verify by scanning</h3>
|
<h3>Verify by scanning</h3>
|
||||||
@ -43,12 +59,20 @@ export default class VerificationPanel extends React.PureComponent {
|
|||||||
}, {
|
}, {
|
||||||
a: t => <a>{ t }</a>,
|
a: t => <a>{ t }</a>,
|
||||||
})}</p>
|
})}</p>
|
||||||
<div>QR Code</div>
|
|
||||||
|
<VerificationQRCode
|
||||||
|
keyholderUserId={MatrixClientPeg.get().getUserId()}
|
||||||
|
requestEventId={request.requestEvent.getId()}
|
||||||
|
otherUserKey={crossSigningInfo.getId("master")}
|
||||||
|
secret={request.encodedSharedSecret}
|
||||||
|
keys={qrCodeKeys}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx_UserInfo_container">
|
<div className="mx_UserInfo_container">
|
||||||
<h3>Verify by emoji</h3>
|
<h3>Verify by emoji</h3>
|
||||||
<p>{_t("If you can't scan the code above, verify by comparing unique emoji.")}</p>
|
<p>{_t("If you can't scan the code above, verify by comparing unique emoji.")}</p>
|
||||||
|
|
||||||
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={this._startSAS}>
|
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={this._startSAS}>
|
||||||
{_t("Verify by emoji")}
|
{_t("Verify by emoji")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
|
Loading…
Reference in New Issue
Block a user