Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Wait for verification request on login
Browse files Browse the repository at this point in the history
Basically just changes to the designed screen to wait for an incoming
verification request in order to verify the device & cross-sign it.

Fixes element-hq/element-web#11215
Fixes element-hq/element-web#11217
  • Loading branch information
dbkr committed Mar 16, 2020
1 parent d53134c commit 6c4b572
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions res/css/structures/auth/_CompleteSecurity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 12 additions & 8 deletions src/components/structures/auth/CompleteSecurity.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class CompleteSecurity extends React.Component {
}
}

onStartClick = async () => {
_onUsePassphraseClick = async () => {
this.setState({
phase: PHASE_BUSY,
});
Expand Down Expand Up @@ -148,26 +148,30 @@ 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 can’t 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"
onClick={this.onSkipClick}
>
{_t("Skip")}
</AccessibleButton>
<AccessibleButton
kind="primary"
onClick={this.onStartClick}
>
{_t("Start")}
</AccessibleButton>
</div>
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 can’t access one, <button>use your recovery key or passphrase.</button>": "If you can’t 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.",
Expand Down

0 comments on commit 6c4b572

Please sign in to comment.