Merge remote-tracking branch 'origin/develop' into dbkr/default_display_name_register

This commit is contained in:
David Baker 2020-01-30 11:45:54 +00:00
commit c8673452be
4 changed files with 35 additions and 11 deletions

View file

@ -211,7 +211,7 @@ limitations under the License.
padding-bottom: 16px; padding-bottom: 16px;
} }
.mx_UserInfo_scrollContainer:not(.mx_UserInfo_separator) { .mx_UserInfo_container:not(.mx_UserInfo_separator) {
padding-top: 16px; padding-top: 16px;
padding-bottom: 0; padding-bottom: 0;

View file

@ -28,21 +28,38 @@ limitations under the License.
.mx_VerificationShowSas_emojiSas { .mx_VerificationShowSas_emojiSas {
text-align: center; text-align: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
margin: 25px 0;
} }
.mx_VerificationShowSas_emojiSas_block { .mx_VerificationShowSas_emojiSas_block {
display: inline-block; display: inline-block;
margin-left: 15px; margin-bottom: 30px;
margin-right: 15px; position: relative;
text-align: center; // allow the blocks to grow to space themselves evenly up to a limit of 100px
margin-bottom: 20px; flex-grow: 1;
max-width: 100px;
} }
.mx_VerificationShowSas_emojiSas_emoji { .mx_VerificationShowSas_emojiSas_emoji {
font-size: 48px; font-size: 48px;
} }
.mx_VerificationShowSas_emojiSas_label { .mx_UserInfo .mx_VerificationShowSas_emojiSas_emoji {
text-align: center; font-size: 32px; // in UserInfo use a smaller font-size to fit in a smaller space
font-weight: bold; }
.mx_VerificationShowSas_emojiSas_label {
font-weight: bold;
// allow the text to overflow the parent by 15px on each side
// this is to keep the width of the parent consistent for spacing centrally via flexbox
position: absolute;
left: -15px;
right: -15px;
}
.mx_VerificationShowSas_emojiSas_break {
flex-basis: 100%;
} }

View file

@ -32,6 +32,7 @@ import MatrixClientBackedSettingsHandler from "./settings/handlers/MatrixClientB
import * as StorageManager from './utils/StorageManager'; import * as StorageManager from './utils/StorageManager';
import IdentityAuthClient from './IdentityAuthClient'; import IdentityAuthClient from './IdentityAuthClient';
import { crossSigningCallbacks } from './CrossSigningManager'; import { crossSigningCallbacks } from './CrossSigningManager';
import {SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
interface MatrixClientCreds { interface MatrixClientCreds {
homeserverUrl: string, homeserverUrl: string,
@ -217,7 +218,11 @@ class _MatrixClientPeg {
timelineSupport: true, timelineSupport: true,
forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false), forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false),
fallbackICEServerAllowed: !!SettingsStore.getValue('fallbackICEServerAllowed'), fallbackICEServerAllowed: !!SettingsStore.getValue('fallbackICEServerAllowed'),
verificationMethods: [verificationMethods.SAS, verificationMethods.QR_CODE_SHOW], verificationMethods: [
verificationMethods.SAS,
SHOW_QR_CODE_METHOD,
verificationMethods.RECIPROCATE_QR_CODE,
],
unstableClientRelationAggregation: true, unstableClientRelationAggregation: true,
identityServer: new IdentityAuthClient(), identityServer: new IdentityAuthClient(),
}; };

View file

@ -62,7 +62,9 @@ export default class VerificationShowSas extends React.Component {
</div>, </div>,
); );
sasDisplay = <div className="mx_VerificationShowSas_emojiSas"> sasDisplay = <div className="mx_VerificationShowSas_emojiSas">
{emojiBlocks} {emojiBlocks.slice(0, 4)}
<div className="mx_VerificationShowSas_emojiSas_break" />
{emojiBlocks.slice(4)}
</div>; </div>;
sasCaption = _t( sasCaption = _t(
"Verify this user by confirming the following emoji appear on their screen.", "Verify this user by confirming the following emoji appear on their screen.",
@ -105,8 +107,8 @@ export default class VerificationShowSas extends React.Component {
return <div className="mx_VerificationShowSas"> return <div className="mx_VerificationShowSas">
<p>{sasCaption}</p> <p>{sasCaption}</p>
<p>{_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
{sasDisplay} {sasDisplay}
<p>{_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
{confirm} {confirm}
</div>; </div>;
} }