Wait for verification request on login

Basically just changes to the designed screen to wait for an incoming
verification request in order to verify the device & cross-sign it.

Fixes https://github.com/vector-im/riot-web/issues/11215
Fixes https://github.com/vector-im/riot-web/issues/11217
This commit is contained in:
David Baker 2020-03-16 17:47:56 +00:00
parent d53134cb1e
commit 6c4b572c7e
3 changed files with 19 additions and 9 deletions

View file

@ -37,6 +37,10 @@ limitations under the License.
font-size: 15px;
}
.mx_CompleteSecurity_waiting {
color: $notice-secondary-color;
}
.mx_CompleteSecurity_actionRow {
display: flex;
justify-content: flex-end;

View file

@ -54,7 +54,7 @@ export default class CompleteSecurity extends React.Component {
}
}
onStartClick = async () => {
_onUsePassphraseClick = async () => {
this.setState({
phase: PHASE_BUSY,
});
@ -148,13 +148,23 @@ export default class CompleteSecurity extends React.Component {
member={MatrixClientPeg.get().getUser(this.state.verificationRequest.otherUserId)}
/>;
} else if (phase === PHASE_INTRO) {
const InlineSpinner = sdk.getComponent('elements.InlineSpinner');
icon = <span className="mx_CompleteSecurity_headerIcon mx_E2EIcon_warning"></span>;
title = _t("Complete security");
body = (
<div>
<p>{_t(
"Verify this session to grant it access to encrypted messages.",
"Open an existing session & use it to verify this one, granting it access to encrypted messages.",
)}</p>
<p className="mx_CompleteSecurity_waiting"><InlineSpinner />{_t("Waiting…")}</p>
<p>{_t(
"If you cant access one, <button>use your recovery key or passphrase.</button>",
{}, {
button: sub => <AccessibleButton element="span" className="mx_linkButton" onClick={this._onUsePassphraseClick}>
{sub}
</AccessibleButton>,
})}</p>
<div className="mx_CompleteSecurity_actionRow">
<AccessibleButton
kind="danger"
@ -162,12 +172,6 @@ export default class CompleteSecurity extends React.Component {
>
{_t("Skip")}
</AccessibleButton>
<AccessibleButton
kind="primary"
onClick={this.onStartClick}
>
{_t("Start")}
</AccessibleButton>
</div>
</div>
);

View file

@ -1973,7 +1973,9 @@
"Uploading %(filename)s and %(count)s others|one": "Uploading %(filename)s and %(count)s other",
"Could not load user profile": "Could not load user profile",
"Complete security": "Complete security",
"Verify this session to grant it access to encrypted messages.": "Verify this session to grant it access to encrypted messages.",
"Open an existing session & use it to verify this one, granting it access to encrypted messages.": "Open an existing session & use it to verify this one, granting it access to encrypted messages.",
"Waiting…": "Waiting…",
"If you cant access one, <button>use your recovery key or passphrase.</button>": "If you cant access one, <button>use your recovery key or passphrase.</button>",
"Session verified": "Session verified",
"Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.": "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.",
"Your new session is now verified. Other users will see it as trusted.": "Your new session is now verified. Other users will see it as trusted.",