Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
s/block/blacklist for e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Nov 29, 2016
1 parent 1a41637 commit c7fb83e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/components/views/dialogs/EncryptedEventDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = React.createClass({

var verificationStatus = (<b>NOT verified</b>);
if (device.isBlocked()) {
verificationStatus = (<b>Blocked</b>);
verificationStatus = (<b>Blacklisted</b>);
} else if (device.isVerified()) {
verificationStatus = "verified";
}
Expand Down
28 changes: 14 additions & 14 deletions src/components/views/elements/DeviceVerifyButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default React.createClass({
<p>
If it matches, press the verify button below.
If it doesnt, then someone else is intercepting this device
and you probably want to press the block button instead.
and you probably want to press the blacklist button instead.
</p>
<p>
In future this verification process will be more sophisticated.
Expand All @@ -73,33 +73,33 @@ export default React.createClass({
);
},

onBlockClick: function() {
onBlacklistClick: function() {
MatrixClientPeg.get().setDeviceBlocked(
this.props.userId, this.props.device.deviceId, true
);
},

onUnblockClick: function() {
onUnblacklistClick: function() {
MatrixClientPeg.get().setDeviceBlocked(
this.props.userId, this.props.device.deviceId, false
);
},

render: function() {
var blockButton = null, verifyButton = null;
var blacklistButton = null, verifyButton = null;

if (this.props.device.isBlocked()) {
blockButton = (
<button className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_unblock"
onClick={this.onUnblockClick}>
Unblock
blacklistButton = (
<button className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_unblacklist"
onClick={this.onUnblacklistClick}>
Unblacklist
</button>
);
} else {
blockButton = (
<button className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_block"
onClick={this.onBlockClick}>
Block
blacklistButton = (
<button className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_blacklist"
onClick={this.onBlacklistClick}>
Blacklist
</button>
);
}
Expand All @@ -115,7 +115,7 @@ export default React.createClass({
verifyButton = (
<button className="mx_MemberDeviceInfo_textButton mx_MemberDeviceInfo_verify"
onClick={this.onVerifyClick}>
Verify
Verify...
</button>
);
}
Expand All @@ -124,7 +124,7 @@ export default React.createClass({
return (
<div className="mx_MemberDeviceInfo mx_DeviceVerifyButtons" >
{ verifyButton }
{ blockButton }
{ blacklistButton }
</div>
);
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/rooms/MemberDeviceInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default class MemberDeviceInfo extends React.Component {

if (this.props.device.isBlocked()) {
indicator = (
<div className="mx_MemberDeviceInfo_blocked">
<img src="img/e2e-blocked.svg" width="12" height="12" style={{ marginLeft: "-1px" }} alt="Blocked"/>
<div className="mx_MemberDeviceInfo_blacklisted">
<img src="img/e2e-blocked.svg" width="12" height="12" style={{ marginLeft: "-1px" }} alt="Blacklisted"/>
</div>
);
} else if (this.props.device.isVerified()) {
Expand Down

0 comments on commit c7fb83e

Please sign in to comment.