* remove incorrect check for cross-signing
SETUP_ENCRYPTION tries to set up everything (4S, cross-signing and key backup),
rather than just setting up encryption, as its name would imply.
crossSigningReady == false happens when the user's device isn't verified, so it
should trigger VERIFY_THIS_SESSION rather than SETUP_ENCRYPTION
* reorder conditions in allSystemsReady to match the order in the if statements
* explicitly handle secrets missing from 4S
rather than falling back to the SETUP_ENCRYPTION catch-all. Also, remove
SETUP_ENCRYPTION since it is no longer used.
* convert button handlers to switch statements for consistency
(almost) all the other functions that use make decisions based on Kind use
switch statements
* update i18n (remove obsolete string)
* Show indicator in settings dialog when user doesn't have recovery set up
* Update settings headers to use red dot for recommended settings
* update recovery setup toast and remember if the user dismisses it
* update playwright snapshots
* use typed event emitters
* reverse logic for the account data flag
* fix comment and type
* Assert that we set backup_disabled when turning off key storage
* Prompt the user when key storage is unexpectedly off
* Playwright tests for the Turn on key storage toast
* Allow setting the Encryption settings tab to any initial state
* Add a variant to the reset flow for 'sync_failed'
* Catch errors after syncing recovery
Fixes#29229
* fixup! Allow setting the Encryption settings tab to any initial state
* fixup! Add a variant to the reset flow for 'sync_failed'
* Move docs for identity panel variants to ResetIdentityPanelVariant
* Wire up the "Forgot recovery key" button for the "Key storage out of sync" toast
* Unused import & fix test
* Test 'forgot' variant
* Fix dependencies
* Add more toast tests
* Unused import
* Test initialState in Encryption Tab
* Let's see if github has any more luck running this test than me
* Working playwright test with screenshot
* year
* Convert playwright test to use the bot client
* Disambiguate
Co-authored-by: Florian Duros <florianduros@element.io>
* Add doc & do other part of rename
* Split out into custom hook
* Fix tests
---------
Co-authored-by: Florian Duros <florianduros@element.io>
* Refine `SettingsSection` & `SettingsTab`
* Add encryption tab
* Add recovery section
* Add device verification
* Rename `Panel` into `State`
* Update & add tests to user settings common
* Add tests to `RecoveryPanel`
* Add tests to `ChangeRecoveryKey`
* Update CreateSecretStorageDialog-test snapshot
* Add tests to `EncryptionUserSettingsTab`
* Update existing screenshots of e2e tests
* Add new encryption tab ownership to `@element-hq/element-crypto-web-reviewers`
* Add e2e tests
* Fix monospace font and add figma link to hardcoded value
* Add unit to Icon
* Improve e2e doc
* Assert that the crypto module is defined
* Add classname doc
* Fix typo
* Use `good` state instead of default
* Rename `ChangeRecoveryKey.isSetupFlow` into `ChangeRecoveryKey.userHasKeyBackup`
* Move `deleteCachedSecrets` fixture in `recovery.spec.ts`
* Use one callback instead of two in `RecoveryPanel`
* Fix docs and naming of `utils.createBot`
* Fix typo in `RecoveryPanel`
* Add more doc to the state of the `EncryptionUserSettingsTab`
* Rename `verification_required` into `set_up_encryption`
* Update test
* ADd new license
* Very early WIP of rejigged e2e error toast code
* Update comments and doc
* Assert that `recoveryKey.encodedPrivateKey` is always defined
* Add comments to explain how the secrets could be uncached
* Use `matrixClient.secretStorage.getDefaultKeyId` instead of `matrixClient.getCrypto().checkKeyBackupAndEnable` to know if we need to set up a recovery key
* Update existing screenshot to add encryption tab.
* Fix tests
* Remove unused file!
* Remove test for unused file
* Show 'set up encryption' in the 'other' case.
* Test 'key storage out of sync' toast
* Update tests
* Fix test & make toast look correct
* Use new labels when changing the recovery key
* Fix docs
* Don't reset key backup when creating a recovery key
* Add playwright test for toast
* Dismiss the toast as it's now in the way due to being wider
* Doesn't look like this needs to be async
* Typo
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Typo
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Override width for just this toast
---------
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Add commercial licence and update config files
* Update license in headers
* Revert "Update license in headers"
This reverts commit 7ed7949485.
* Update only spdx id
* Remove LicenseRef- from package.json
LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
* Factor out crypto setup process into a store
To make components pure and avoid react 18 dev mode problems due
to components making requests when mounted.
* fix test
* test for the store
* Add comment
* Enable key backup by default
When we set up cross signing, so the key backup key will be stored locally along with the cross signing keys until the user sets up recovery (4s). This will mean that a user can restore their backup if they log in on a new device as long as they verify with the one they registered on.
Replaces https://github.com/element-hq/element-web/pull/28267
* Fix test
* Prompt user to set up 4S on logout
* Fix test
* Add playwright test for key backup by default
* Fix imports
* This isn't unexpected anymore
* Update doc
* Fix docs and function name on renderSetupBackupDialog()
* Use checkKeyBackupAndEnable
* Docs for setup encryption toast
* Also test the toast appears
* Update mock for the method we use now
* Okay fine I guess we need both
* Swap here too
* Fix comment & doc comments