Add new session verification details dialog

This gives more info on the session you're about to verify, including device
name and ID.

Fixes https://github.com/vector-im/riot-web/issues/11977
This commit is contained in:
J. Ryan Stinnett 2020-01-27 23:14:02 +00:00
parent a168461e8b
commit d014c5239b
6 changed files with 138 additions and 3 deletions

View file

@ -34,11 +34,12 @@ export default class VerifySessionToast extends React.PureComponent {
_onReviewClick = async () => {
const cli = MatrixClientPeg.get();
const DeviceVerifyDialog = sdk.getComponent('views.dialogs.DeviceVerifyDialog');
const NewSessionReviewDialog =
sdk.getComponent('views.dialogs.NewSessionReviewDialog');
const device = await cli.getStoredDevice(cli.getUserId(), this.props.deviceId);
Modal.createTrackedDialog('New Session Verify', 'Starting dialog', DeviceVerifyDialog, {
Modal.createTrackedDialog('New Session Review', 'Starting dialog', NewSessionReviewDialog, {
userId: MatrixClientPeg.get().getUserId(),
device,
}, null, /* priority = */ false, /* static = */ true);