Merge pull request #3758 from matrix-org/dbkr/hide_verify_if_verified

Don't show the 'verify' button if the user is verified
This commit is contained in:
David Baker 2019-12-21 17:41:01 +00:00 committed by GitHub
commit 25f59ed43d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -1286,11 +1286,20 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {
const devicesSection = isRoomEncrypted ?
(<DevicesSection loading={devices === undefined} devices={devices} userId={user.userId} />) : null;
const userVerified = cli.checkUserTrust(user.userId).isVerified();
let verifyButton;
if (!userVerified) {
verifyButton = <AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyDevice(user.userId, null)}>
{_t("Verify")}
</AccessibleButton>;
}
const securitySection = (
<div className="mx_UserInfo_container">
<h3>{ _t("Security") }</h3>
<p>{ text }</p>
<AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyDevice(user.userId, null)}>{_t("Verify")}</AccessibleButton>
{verifyButton}
{ devicesSection }
</div>
);

View file

@ -1124,8 +1124,8 @@
"This client does not support end-to-end encryption.": "This client does not support end-to-end encryption.",
"Messages in this room are not end-to-end encrypted.": "Messages in this room are not end-to-end encrypted.",
"Messages in this room are end-to-end encrypted.": "Messages in this room are end-to-end encrypted.",
"Security": "Security",
"Verify": "Verify",
"Security": "Security",
"Sunday": "Sunday",
"Monday": "Monday",
"Tuesday": "Tuesday",