* Add ability to prevent window content being captured by other apps (Desktop)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Increase coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Increase coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Stop migrationg to MSC4278 if the config exists.
* Run migration after we have synced the client.
* Setup the SettingsController with a client.
* Add tests to check migration behaviour.
* update copyright
* Wait for sync properly
* Catch failure
* Docs
* licence
* Inline async code
* Fix migrateURLPreviewsE2EE too
* drop an import
* go away
* Allow jumping to message search from spotlight
replaces the message search hint which referenced the old UX
Fixes#29831
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update RoomSummaryCard.tsx
* Update actions.ts
* Delete src/hooks/useTransition.ts
* Update RoomSummaryCard.tsx
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add report room dialog button/dialog.
* Update copy
* fixup tests / lint
* Fix title in test.
* update snapshot
* Add unit tests for dialog
* lint
* First pass at adding a report room on invite.
* Use a single line input field for reason to avoid bumping the layout.
* Fixups
* Embed reason to make it clear on grouping
* Revert accidental commit
* lint
* Add some playwright tests.
* tweaks
* Make ignored users list more accessible.
* i18n
* Fix sliding sync test.
* Add unit test
* Even more unit tests.
* move test
* Update to match designs.
* remove console statements
* fix css
* tidy up
* improve comments
* fix css
* updates
* Switch away from nesting React trees and mangling the DOM
By parsing HTML events and manipulating the AST before passing it to React
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use MatrixClientContext in Pill now that we are in the main React tree
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add missing import
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Break import cycles
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Minimise
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Docs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Experimental SSS
Working branch to get SSS functional on element-web.
Requires https://github.com/matrix-org/matrix-js-sdk/pull/4400
* Adjust tests to use new behaviour
* Remove well-known proxy URL lookup; always use native
This is actually required for SSS because otherwise it would use
the proxy over native support.
* Linting
* Debug logging
* Control the race condition when swapping between rooms
* Dont' filter by space as synapse doesn't support it
* Remove SS code related to registering lists and managing ranges
- Update the spidering code to spider all the relevant lists.
- Add canonical alias to the required_state to allow room name calcs to work.
Room sort order is busted because we don't yet look at `bump_stamp`.
* User bumpStamp if it is present
* Drop initial room load from 20 per list to 10
* Half the batch size to trickle more quickly
* Prettier
* prettier on tests too
* Remove proxy URL & unused import
* Hopefully fix tests to assert what the behaviour is supposed to be
* Move the singleton to the manager tyo fix import loop
* Very well, code, I will remove you
Why were you there in the first place?
* Strip out more unused stuff
* Fix playwright test
Seems like this lack of order updating unless a room is selected
was just always a bug with both regular and non-sliding sync. I
have no idea how the test passed on develop because it won't run.
* Fix test to do maybe what it was supposed to do... possibly?
* Remove test for old pre-simplified sliding sync behaviour
* Unused import
* Remove sliding sync proxy & test
I was wrong about what this test was asserting, it was suposed
to assert that notification dots aren't shown (because SS didn't
support them somehow I guess) but they are fine in SSS so the test
is just no longer relevant.
* Remove now pointless credentials
* Remove subscription removal as SSS doesn't do that
* Update tests
* add test
* Switch to new labs flag & break if old labs flag is enabled
* Remove unused import & fix test
* Fix other test
* Remove name & description from old labs flag
as they're not displayed anywhere so not useful
* Remove old sliding sync option
by making it not a feature
* Add back unread nindicator test but inverted
and minus the bit about disabling notification which surely would have
defeated the original point anyway?
* Reinstate test for room_subscriptions
...and also make tests actually use sliding sync
* Use UserFriendlyError
* Remove empty constructor
* Remove unrelated changes
* Unused import
* Fix import
* Avoid moving import
---------
Co-authored-by: Kegan Dougal <7190048+kegsay@users.noreply.github.com>
* refactor(room list item): rename `RoomListCell` into `RoomListItemView`
* refactor(room list item): move open room action to new room list item view model
* feat(hover menu): add `hasAccessToOptionsMenu`
* feat(hover menu): add to `RoomListItemViewModel` the condition to display or not the hover menu
* feat(hover menu): add view model for the hover menu
* feat(hover menu): add hover menu view
* feat(hover menu): add hover menu to room list item
* feat(hover menu): update i18n
* test(view model list item): update test and add test to `showHoverMenu`
* test(room list): update snapshot
* test(room list item menu): add tests for view model
* test(room list item menu): add tests for view
* test(room list item): add tests
* test(e2e): add tests for more options menu
* chore: update compound web
* test(e2e): fix typo
* 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>
* feat(devtools): add crypto information in devtools
* ci: add crypto devtools file to crypto code owners
* test(dev tools): update test to add new crypto button
* test(dev tools): add tests for crypto component
* 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
* Add new e2e icon for the member tile
* Add new presence icon for member tile
* Implement new member tile
* Implement memberlist view model
* Implement new memberlist header view
* Support the new memberlist in Diasambiguated profile
1. Use MemberInfo instead of RoomMember
2. CSS changes to reflect the new design
* Implement new memberlist view
* Add and use a new overflow component
We used the EntityTile component as a pretend overflow tile in some
places. This new lighter component is added so that we can remove the
complex EntityTile component.
* Remove old code
* Add/remove css files from _components.pcss
* Increase minimum width as per design
* Actually use the new memberlist view
* Fix broken jest tests
* Add jest tests
* Playwright: Make it possible to disable presence
* Add playwright tests
* Fix lint error
* Undo translation changes that must be done via localazy
* Update license header
* Use waitFor instead of setTimeout
* Remove comment
* Switch over from template to container hs
* Revert unintended change
* Move config to top level
* 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
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in RoomView
* Add `isRoomEncrypted` to room
* Update e2eStatus and urlPreview when isRoomEncrypted is computed
* Fix e2e test
* Add tests when user verification change
* Reduced abusive timeout in e2e test
* Use `CryptoApi.getKeyBackupInfo` instead of deprecated `MatrixClient.getKeyBackupVersion`
* Review changes
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Use new `CrytoApi.restoreKeyBackup` & `CrytoApi.restoreKeyBackupFromPassprhase` api
* Use new `CrytoApi.restoreKeyBackup` api in `SetupEncryptionStore`
* Add tests to `RestoreKeyBackupDialog`
* Remove "Upgrade your encryption" flow
* Rename and remove tests
* Remove `BackupTrustInfo`
* Get keybackup when bootstraping the secret storage.
* Update src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Refactor CreateCrossSigningDialog
* Converts CreateCrossSigningDialog to a functional component
* Pulls logic out to its own class
* Updates usage of deprecated cross signing bootstrap method on client to be on the crypto object and updates test to match
Moved from https://github.com/element-hq/matrix-react-sdk/pull/131
* Add mock here too
* Use the right mock
* Remove duplicate mock
* Stray jest mock line
* Un-move mocks
* tsdoc
* Typo
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
---------
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Migrating deprecated sync `MatrixClient.getKeyBackupEnabled` to async `MatrixClient.CryptoApi.getActiveSessionBackupVersion` in `NewRecoveryMethodDialog`.
Rewrite `NewRecoveryMethodDialog` into a functional component to make it easier to handle the new async method.
* Migrating deprecated sync `MatrixClient.getKeyBackupEnabled` to async `MatrixClient.CryptoApi.getActiveSessionBackupVersion` in `MatrixChat`.
This seems to be causing a lot of weirdness, presumably because there's
another missing thing like in #135, but I don't know what it might be and
it feels like it might take a while to find. Backing these changes out
to fix develop while we sort it out.
Fixes https://github.com/element-hq/element-web/issues/28179
* Fix bell icons on room list hover being black squares
The EchoStore wasn't being set up and therefore missed the client being
injected.
Patch from @t3chguy.
* Fix tests
...by mocking out createClient so it doesn't try to start a real client.
* More mocks
* Don't need this anymore either
Add a labs option which will, when set, switch into the "invisible crypto"
mode of refusing to send keys to, or decrypt messages from, devices that have
not been signed by their owner.
* CryptographyPanel: fix display of device key
* CryptographPanel: Fix HTML nesting
you're not supposed to put <tr> directly inside <table>; doing so causes
warnings.
* Update tests
* Add config option to force verification
If this is set, users will not have the option to skip verification
on login (they will still be able to reload and continue unverified,
currently). Default off.
* Test for complete security dialog
* I hadn't set up prettier
* Refactor the various email/phone management UI into a single component
These were basically the same component copied & pasted 3 times and
tweaked to match the behaviour of each case. This de-dupes them into
one component.
This all could really benefit from playwright tests, but would require
setting up a dummy ID server in the playwright tests. This is all legacy
pre-MAS stuff so its questionable whether its worth the effort.
* Basic test, remove old tests
* Use different text to confirm remove & put headers back
although the two texts are both 'Remove' in practice
* Remove string
This was never triggered anyway with sydent & synapse because they
don't seem to agree on what error to return. In any case, I think it
makes more sense for it to be consistent with the email path, ie. using
a dialog.
* Avoid nested forms
* Snapshots
* More snapshots
* Test the hs side
* Snapshots
* Test IS bind/revoke
* Test remove can be cancelled
* Test unvalidated cases & fix phone error
* Reset state between tests
* Import useState directly
* One more direct React import
The Widget API spec for delayed events is defined by MSC4157.
Also support "parent" delayed events, which were in a previous version
of MSC4140 and may be reintroduced or be part of a new MSC later.
* Handle media download errors better
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Show error if media download failed
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* More tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add reusable empty state for the right panel
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* New user profile UI in User Settings
Using new Edit In Place component.
* Show avatar upload error
* Fix avatar upload error
* Wire up errors & feedback for display name setting
* Implement avatar upload / remove progress toast
* Add 768px breakpoint
* Fix room profile display
* Update to released compund-web with required components / fixes
* Require compound-web 4.4.0
because we do need it
* Update snapshots
Because of course all the auto-generated IDs of unrelated things
have changed.
* Fix duplicate import
* Fix CSS comment
* Update snapshot
* Run all the tests so the ids stay the same
* Start of a test for ProfileSettings
* More tests
* Test that a toast appears
* Test ToastRack
* Update snapshots
* Add the usernamee control
* Fix playwright tests
* New compound version for editinplace fixes
* Fix useId to not just generate a constant ID
* Use the label in the username component
* Fix widths of test boxes
* Update screenshots
* Put ^ back on compound-web version
* Split CSS for room & user profile settings
and name the components correspondingly
* Fix playwright test
* Update room settings screenshot
* Use original screenshot instead
* Fix styling of unrelated buttons
Needed to be added in other places otherwise the specificity changes.
Also put the old screenshots back.
* Add copyright year
* Fix copyright year