You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Don't show the 'verify' button if the user is verified
Which is more in keeping with the designs (and we can do this now that the new user info panel is only enabled with cross signing).
This commit is contained in:
@@ -1286,11 +1286,20 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {
|
|||||||
|
|
||||||
const devicesSection = isRoomEncrypted ?
|
const devicesSection = isRoomEncrypted ?
|
||||||
(<DevicesSection loading={devices === undefined} devices={devices} userId={user.userId} />) : null;
|
(<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 = (
|
const securitySection = (
|
||||||
<div className="mx_UserInfo_container">
|
<div className="mx_UserInfo_container">
|
||||||
<h3>{ _t("Security") }</h3>
|
<h3>{ _t("Security") }</h3>
|
||||||
<p>{ text }</p>
|
<p>{ text }</p>
|
||||||
<AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyDevice(user.userId, null)}>{_t("Verify")}</AccessibleButton>
|
{verifyButton}
|
||||||
{ devicesSection }
|
{ devicesSection }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user