Merge pull request #3975 from matrix-org/t3chguy/right_panel_learn_more

Replace Verify button in UserInfo verification with "Learn more"
pull/21833/head
Michael Telatynski 2020-01-29 15:27:46 +00:00 committed by GitHub
commit 9457520cc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 11 deletions

View File

@ -260,11 +260,11 @@ limitations under the License.
}
}
.mx_UserInfo_verify {
.mx_UserInfo_wideButton {
display: block;
margin: 16px 0;
}
button.mx_UserInfo_verify {
button.mx_UserInfo_wideButton {
width: 100%; // FIXME get rid of this once we get rid of DialogButtons here
}
}

View File

@ -38,7 +38,7 @@ const EncryptionInfo = ({pending, member, onStartVerification}) => {
} else {
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
content = (
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={onStartVerification}>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={onStartVerification}>
{_t("Start Verification")}
</AccessibleButton>
);

View File

@ -1255,11 +1255,12 @@ const BasicUserInfo = ({room, member, groupId, devices, isRoomEncrypted}) => {
userTrust.isCrossSigningVerified() :
userTrust.isVerified();
const isMe = member.userId === cli.getUserId();
let verifyButton;
if (isRoomEncrypted && !userVerified && !isMe) {
verifyButton = (
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={() => verifyUser(member)}>
{_t("Verify")}
<AccessibleButton className="mx_UserInfo_field" onClick={() => verifyUser(member)}>
{_t("Learn more")}
</AccessibleButton>
);
}

View File

@ -63,7 +63,7 @@ export default class VerificationPanel extends React.PureComponent {
button = <Spinner />;
} else {
button = (
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={this._startSAS}>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this._startSAS}>
{_t("Verify by emoji")}
</AccessibleButton>
);
@ -128,7 +128,7 @@ export default class VerificationPanel extends React.PureComponent {
<E2EIcon isUser={true} status="verified" size={128} />
<p>Verify all users in a room to ensure it's secure.</p>
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={this.props.onClose}>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
{_t("Got it")}
</AccessibleButton>
</div>
@ -156,7 +156,7 @@ export default class VerificationPanel extends React.PureComponent {
<h3>Verification cancelled</h3>
<p>{ text }</p>
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={this.props.onClose}>
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
{_t("Got it")}
</AccessibleButton>
</div>

View File

@ -80,7 +80,7 @@ export default class VerificationShowSas extends React.Component {
} else {
return <div>
{_t("Unable to find a supported verification method.")}
<AccessibleButton kind="primary" onClick={this.props.onCancel} className="mx_UserInfo_verify">
<AccessibleButton kind="primary" onClick={this.props.onCancel} className="mx_UserInfo_wideButton">
{_t('Cancel')}
</AccessibleButton>
</div>;
@ -96,10 +96,10 @@ export default class VerificationShowSas extends React.Component {
confirm = <DialogButtons
primaryButton={_t("They match")}
onPrimaryButtonClick={this.onMatchClick}
primaryButtonClass="mx_UserInfo_verify"
primaryButtonClass="mx_UserInfo_wideButton"
cancelButton={_t("They don't match")}
onCancel={this.props.onCancel}
cancelButtonClass="mx_UserInfo_verify"
cancelButtonClass="mx_UserInfo_wideButton"
/>;
}

View File

@ -1172,6 +1172,7 @@
"<strong>%(role)s</strong> in %(roomName)s": "<strong>%(role)s</strong> in %(roomName)s",
"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.",
"Learn more": "Learn more",
"Security": "Security",
"Verify by emoji": "Verify by emoji",
"Verify by comparing unique emoji.": "Verify by comparing unique emoji.",