You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Merge pull request #315 from matrix-org/rav/unverify_device
Support for making devices unverified
This commit is contained in:
@@ -25,8 +25,15 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onVerifyClick: function() {
|
onVerifyClick: function() {
|
||||||
MatrixClientPeg.get().setDeviceVerified(this.props.userId,
|
MatrixClientPeg.get().setDeviceVerified(
|
||||||
this.props.device.id);
|
this.props.userId, this.props.device.id, true
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
onUnverifyClick: function() {
|
||||||
|
MatrixClientPeg.get().setDeviceVerified(
|
||||||
|
this.props.userId, this.props.device.id, false
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
@@ -35,9 +42,15 @@ module.exports = React.createClass({
|
|||||||
indicator = (
|
indicator = (
|
||||||
<div className="mx_MemberDeviceInfo_verified">✔</div>
|
<div className="mx_MemberDeviceInfo_verified">✔</div>
|
||||||
);
|
);
|
||||||
|
button = (
|
||||||
|
<div className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_unverify"
|
||||||
|
onClick={this.onUnverifyClick}>
|
||||||
|
Unverify
|
||||||
|
</div>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
button = (
|
button = (
|
||||||
<div className="mx_MemberDeviceInfo_textButton"
|
<div className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_verify"
|
||||||
onClick={this.onVerifyClick}>
|
onClick={this.onVerifyClick}>
|
||||||
Verify
|
Verify
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user