Replace event verification logic with new code in js-sdk (#11528)

* Use new crypto-api for cross user verification

* update verification flow with new APIs

* Replace some calls to `checkUserTrust`

A start on https://github.com/vector-im/crypto-internal/issues/147

* Enable cypress tests

* update tests

* Delegate decisions on event shields to the js-sdk

* rerender after editing events

This is required because a transition from "valid event" to "unencrypted event"
no longer triggers a state change, so the component does not render
itself. Previously, this would be a transition from `verified:
E2EState.Normal` to `verified: null`.

* Update tests

* prettier

* Test coverage

---------

Co-authored-by: Florian Duros <florianduros@element.io>
This commit is contained in:
Richard van der Hoff 2023-09-18 19:12:18 +02:00 committed by GitHub
parent 579b0dd10a
commit cf2340bcad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 216 additions and 167 deletions

View file

@ -846,17 +846,17 @@ $left-gutter: 64px;
}
&.mx_EventTile_e2eIcon_warning::after {
mask-image: url("$(res)/img/e2e/warning.svg");
background-color: $e2e-warning-color;
mask-image: url("$(res)/img/e2e/warning.svg"); // (!) in a shield
background-color: $e2e-warning-color; // red
}
&.mx_EventTile_e2eIcon_normal::after {
mask-image: url("$(res)/img/e2e/normal.svg");
background-color: $header-panel-text-primary-color;
mask-image: url("$(res)/img/e2e/normal.svg"); // regular shield
background-color: $header-panel-text-primary-color; // grey
}
&.mx_EventTile_e2eIcon_decryption_failure::after {
mask-image: url("$(res)/img/e2e/decryption-failure.svg");
mask-image: url("$(res)/img/e2e/decryption-failure.svg"); // key in a circle
background-color: $secondary-content;
}
}