* 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
* Switch from defer to PromiseWithResolvers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add modernizr check
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* 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
* [create-pull-request] automated change
* Update tests for copy changes on 'only send to verified'
* Update one more test snapshot for new wording of exclude unverified
* Update screenshots
---------
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Add key storage toggle to Encryption settings
* Keys in the acceptable order
* Fix some tests
* Fix import
* Fix toast showing condition
* Fix import order
* Fix playwright tests
* Fix bits lost in merge
* Add key storage delete confirm screen
* Fix hardcoded Element string
* Fix type imports
* Fix tests
* Tests for key storage delete panel
* Fix test
* Type import
* Test for the view model
* Fix type import
* Actually fix type imports
* Test updating
* Add playwright test & clarify slightly confusing comment
* Show the advnced section whatever the state of key storage
* Update screenshots
* Copy css to its own file
* Add missing doc & merge loading states
* Add tsdoc & loading alt text to spinner
* Turn comments into proper tsdoc
* Switch to TypedEventEmitter and remove unnecessary loading state
* Add screenshot
* Use higher level interface
* Merge the two hooks in EncryptionUserSettingsTab
* Remove unused import
* Don't check key backup enabled state separately
as we don't need it for all the screens
* Update snapshot
* Use fixed recovery key function
* Amalgamate duplicated CSS files
* Have "key storage disabled" as a separate state
* Update snapshot
* Fix... bad merge?
* Add backup enabled mock to more tests
* More snapshots
* Use defer util
* Update to use EncryptionCardButtons
* Update snapshots
* Use EncryptionCardEmphasisedContent
* Update snapshots
* Update snapshot
* Try screenshot from CI playwright
* Try playwright screenshots again
* More screenshots
* Rename to match files
* Test that 4S secrets are deleted
* Make description clearer
* Fix typo & move related states together
* Add comment
* More comments
* Fix hook docs
* restoreAllMocks
* Update snapshot
because pulling in upstream has caused IDs to shift
* Switch icon
as apparenty the error icon has changed
* Update snapshot
* Missing copyright
* Re-order states
and also sort out indenting
* Remove phantom space
* Clarify 'button'
* Clarify docs more
* Explain thinking behind updating
* Switch to getActiveBackupVersion
which checks that key backup is happining on this device, which is
consistent with EX.
* Add use of Key Storage Panel
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Change key storage panel to be consistent
ie. using getActiveBackupVersion(), and add comment
* Add tsdoc
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Use BACKUP_DISABLED_ACCOUNT_DATA_KEY in more places
* Expand doc
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Undo random yarn lock change
* Use aggregate method for disabling key storage
in https://github.com/matrix-org/matrix-js-sdk/pull/4742
* Fix tests
* Use key backup status event to update
* Comment formatting
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Fix comment & put check inside if statement
* Add comment
* Prettier
* Fix comment
* Update snapshot
Which has gained nowrap due to 917d53a56f
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* prevent user from accidentally triggering multiple identity resets
* apply changes from review and update to latest design
* Use a CSS class and compound variable
* update snapshot
* Update test/unit-tests/components/views/settings/encryption/ResetIdentityPanel-test.tsx
---------
Co-authored-by: Richard van der Hoff <richard@matrix.org>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* chore: update `@vector-im/compound-design-tokens` & `@vector-im/compound-web` to last version
* chore: use `error-solid` icon instead of `error`
* chore: update jest snapshot
* fix: `AccessibleButton` lint
* Move CSS for ResetIdentityPanel into EncryptionCard
This allows it to be re-used in other components. It's a *bit* magic
that EncryptionCard applies style to divs within it, although it
somewhat makes sense that it wants them styled a particular way.
The alternative would be to add another component for a div child of
encryption card like EncryptionCardButtons that just makes it flexbox
and centered: I'm not sure which is better.
* Update snapshot
* Update snapshot
* Do it the other way
Because we only want it in the destructive cards, not the other ones.
* Use flex component
* Also use gap prop and update snapshots
* Fix justification
* Snaspshots again
* Set align-items to normal
As center affected the list items too. Also add it to the flex
component because it didn't have it as an option.
* Factor out duplicated CSS for buttons in encryption settings
By adding a component to hold the common CSS
* Update snapshot
* Update snapshot
* More snapshots
* Split EncryptionCardButtons out to separate component
* Update imports
* CreateSecretStorageDialog: error handling
I'm fed up with setup operations in EW failing silently. Rather than leaving
the user with a mysteriously broken client, let's at least tell them that
something has gone wrong, so that they can report the issue and we can
investigate.
Obviously, showing an unactionable Error dialog is a last resort: ideally, we
should handle the error ourselves, or give the user actionable steps to resolve
the problem. But that takes significant design and engineering.
Just swallowing errors is the worst of all possible options.
* Fix typo in test name
* Improve test coverage
* 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>
* fix(encryption tab): hide the advanced section when the secrets are not cached locally
The secret verification is now made at the level of `EncryptionUserSettingsTab` instead at the `RecoveryPanel` level. In the `EncryptionUserSettingsTab`, we decide to only display `RecoveryPanelOutOfSync` in case of uncached secrets.
`RecoveryPanelOutOfSync` is simplified version of `RecoveryPanel` handling only the `secrets_not_cached` case.
* refactor(encryption tab): simplify the `RecoveryPanel` without having to handle the missing secrets
* test(encryption tab): move test about cached secrets in `EncryptionUserSettingsTab-test.tsx`
* test(encryption tab): move e2e test which are testing all the encryption tab in `encryption-tab.spec.ts
* refactor(encryption tab): move `RecoveryPanelOutOfSync` in its own file
- fix typos
- call onFinish after accessSecretStorage
- onFinish doesn't need to be asynchronous
* doc(encryption tab): improve documentation when the secrets are not cached locally
* test(encryption tab): improve test documentation and naming
* doc(encryption tab): improve `RecoveryPanelOutOfSync` documentation
* Make the encryption card more configurable:
- Change the icon
- Can set the destructive props
* Update compound
* Add advanced section
* Add the `Never send encrypted messages to unverified devices` settings
* - Add commercial license
- Remove generic type
* Rename EncryptionDetails css classes
* Use same uiAuthCallback
* Use h3 for title
* Add tests to `AdvancedPanel`
* Add tests to `EncryptionUserSettingsTab`
* Add tests to `ResetIdentityPanel`
* Get only the recovery section in recovery tests
* Add e2e test
* 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
* 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.
* Update tests
* Use new labels when changing the recovery key
* Fix docs
* Don't reset key backup when creating a recovery key
* Fix doc