* Support for login + E2EE set up with QR
* Whitespace
* Padding
* Refactor of fetch
* Whitespace
* CSS whitespace
* Add link to MSC3906
* Handle incorrect typing in MatrixClientPeg.get()
* Use unstable class name
* fix: use unstable class name
* Use default fetch client instead
* Update to revised function name
* Refactor device manager panel and make it work with new sessions manager
* Lint fix
* Add missing interstitials and update wording
* Linting
* i18n
* Lint
* Use sensible sdk config name for fallback server
* Improve error handling for QR code generation
* Refactor feature availability logic
* Hide device manager panel if no options available
* Put sign in with QR behind lab setting
* Reduce scope of PR to just showing code on existing device
* i18n updates
* Handle null features
* Testing for LoginWithQRSection
* Refactor to handle UIA
* Imports
* Reduce diff complexity
* Remove unnecessary change
* Remove unused styles
* Support UIA
* Tidy up
* i18n
* Remove additional unused parts of flow
* Add extra instruction when showing QR code
* Add getVersions to server mocks
* Use proper colours for theme support
* Test cases
* Lint
* Remove obsolete snapshot
* Don't override error if already set
* Remove unused var
* Update src/components/views/settings/devices/LoginWithQRSection.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update res/css/views/auth/_LoginWithQR.pcss
Co-authored-by: Kerry <kerrya@element.io>
* Use spacing variables
* Remove debug
* Style + docs
* preventDefault
* Names of tests
* Fixes for js-sdk refactor
* Update snapshots to match test names
* Refactor labs config to make deployment simpler
* i18n
* Unused imports
* Typo
* Stateless component
* Whitespace
* Use context not MatrixClientPeg
* Add missing context
* Type updates to match js-sdk
* Wrap click handlers in useCallback
* Update src/components/views/settings/DevicesPanel.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Wait for DOM update instead of timeout
* Add missing snapshot update from last commit
* Remove void keyword in favour of then() clauses
* test main paths in LoginWithQR
* test coverage for display of qr code section
* remove unused test props
Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Support for login + E2EE set up with QR
* Whitespace
* Padding
* Refactor of fetch
* Whitespace
* CSS whitespace
* Add link to MSC3906
* Handle incorrect typing in MatrixClientPeg.get()
* Use unstable class name
* fix: use unstable class name
* Use default fetch client instead
* Update to revised function name
* Refactor device manager panel and make it work with new sessions manager
* Lint fix
* Add missing interstitials and update wording
* Linting
* i18n
* Lint
* Use sensible sdk config name for fallback server
* Improve error handling for QR code generation
* Refactor feature availability logic
* Hide device manager panel if no options available
* Put sign in with QR behind lab setting
* Reduce scope of PR to just showing code on existing device
* i18n updates
* Handle null features
* Testing for LoginWithQRSection
* Refactor to handle UIA
* Imports
* Reduce diff complexity
* Remove unnecessary change
* Remove unused styles
* Support UIA
* Tidy up
* i18n
* Remove additional unused parts of flow
* Add extra instruction when showing QR code
* Add getVersions to server mocks
* Use proper colours for theme support
* Test cases
* Lint
* Remove obsolete snapshot
* Don't override error if already set
* Remove unused var
* Update src/components/views/settings/devices/LoginWithQRSection.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update res/css/views/auth/_LoginWithQR.pcss
Co-authored-by: Kerry <kerrya@element.io>
* Use spacing variables
* Remove debug
* Style + docs
* preventDefault
* Names of tests
* Fixes for js-sdk refactor
* Update snapshots to match test names
* Refactor labs config to make deployment simpler
* i18n
* Unused imports
* Typo
* Stateless component
* Whitespace
* Use context not MatrixClientPeg
* Add missing context
* Type updates to match js-sdk
* Wrap click handlers in useCallback
* Update src/components/views/settings/DevicesPanel.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Wait for DOM update instead of timeout
* Add missing snapshot update from last commit
* Remove void keyword in favour of then() clauses
* test main paths in LoginWithQR
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Kerry <kerrya@element.io>
* Add Stores and StoresContext and use it in MatrixChat and RoomView
Added a new kind of class:
- Add God object `Stores` which will hold refs to all known stores and the `MatrixClient`. This object is NOT a singleton.
- Add `StoresContext` to hold onto a ref of `Stores` for use inside components.
`StoresContext` is created via:
- Create `Stores` in `MatrixChat`, assigning the `MatrixClient` when we have one set. Currently sets the RVS to `RoomViewStore.instance`.
- Wrap `MatrixChat`s `render()` function in a `StoresContext.Provider` so it can be used anywhere.
`StoresContext` is currently only used in `RoomView` via the following changes:
- Remove the HOC, which redundantly set `mxClient` as a prop. We don't need this as `RoomView` was using the client from `this.context`.
- Change the type of context accepted from `MatrixClientContext` to `StoresContext`.
- Modify alllll the places where `this.context` is used to interact with the client and suffix `.client`.
- Modify places where we use `RoomViewStore.instance` and replace them with `this.context.roomViewStore`.
This makes `RoomView` use a non-global instance of RVS.
* Linting
* SDKContext and make client an optional constructor arg
* Move SDKContext to /src/contexts
* Inject all RVS deps
* Linting
* Remove reset calls; deep copy the INITIAL_STATE to avoid test pollution
* DI singletons used in RoomView; DI them in RoomView-test too
* Initial RoomViewStore.instance after all files are imported to avoid cyclical deps
* Lazily init stores to allow for circular dependencies
Rather than stores accepting a list of other stores in their constructors,
which doesn't work when A needs B and B needs A, make new-style stores simply
accept Stores. When a store needs another store, they access it via `Stores`
which then lazily constructs that store if it needs it. This breaks the
circular dependency at constructor time, without needing to introduce
wiring diagrams or any complex DI framework.
* Delete RoomViewStore.instance
Replaced with Stores.instance.roomViewStore
* Linting
* Move OverridableStores to test/TestStores
* Rejig how eager stores get made; don't automatically do it else tests break
* Linting
* Linting and review comments
* Fix new code to use Stores.instance
* s/Stores/SdkContextClass/g
* Update docs
* Remove unused imports
* Update src/stores/RoomViewStore.tsx
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove empty c'tor to make sonar happy
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
If the last room administrator leaves a room, other users cannot
gain admin privilges anymore, leaving the room in an unmoderable
state. To help in avoiding this scenario without actually preventing
an admin from leaving the room if they really want, this commit
adds a new warning message.
Attempts to help with: https://github.com/vector-im/element-web/issues/2855
Signed-off-by: Arne Wilken arnepokemon@yahoo.de
* Set relations helper when creating event tile context menu
Fixesvector-im/element-web#22018
Signed-off-by: Johannes Marbach <johannesm@element.io>
* Add e2e tests
* Use idiomatic test names
Signed-off-by: Johannes Marbach <johannesm@element.io>
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Attempt to stabilise login tests
* More stability
* Stabilise s'more
* don't clear LS as we rely on it for enablements
* Add small delay
* Iterate
* Update login.ts
* Listen for and update the notification state when they change
* Remove unnecessary listeners: justify each listener left remaining
* Update removeListener too
* Added translation using Weblate (Luxembourgish)
* Translated using Weblate (Turkish)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tr/
* Translated using Weblate (German)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/de/
* Translated using Weblate (Indonesian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/id/
* Translated using Weblate (Korean)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ko/
* Translated using Weblate (Czech)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/cs/
* Translated using Weblate (Ukrainian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/uk/
* Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hant/
* Translated using Weblate (Slovak)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/sk/
* Translated using Weblate (French)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/fr/
* Translated using Weblate (Russian)
Currently translated at 96.6% (29 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ru/
* Translated using Weblate (Italian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/it/
* Translated using Weblate (Persian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/fa/
* Translated using Weblate (Estonian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/et/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/hu/
* Translated using Weblate (Swedish)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/sv/
* Translated using Weblate (Bulgarian)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/bg/
* Translated using Weblate (Spanish)
Currently translated at 100.0% (30 of 30 strings)
Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/es/
Co-authored-by: pierrebolze <pierre.bolze@epitech.eu>
Co-authored-by: Weblate <translate@riot.im>
Co-authored-by: Michael Telatynski <7t3chguy@googlemail.com>
Co-authored-by: Vri <element@vrifox.cc>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Youngbin Han <sukso96100@gmail.com>
Co-authored-by: waclaw66 <waclaw66@seznam.cz>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
Co-authored-by: Glandos <bugs-github@antipoul.fr>
Co-authored-by: DjAntony <djantony.org@yandex.ru>
Co-authored-by: random <dictionary@tutamail.com>
Co-authored-by: Seyed Masih Sajadi <smasihsajadi@gmail.com>
Co-authored-by: Priit Jõerüüt <riot@joeruut.com>
Co-authored-by: Szimszon <github@oregpreshaz.eu>
Co-authored-by: LinAGKar <linus.kardell@gmail.com>
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
Co-authored-by: iaiz <git@iapellaniz.com>
* conversation export named after room
* sanitization added for exported file name
* sanitization added for exported file name
* sanitization added for exported file name
* sanitization added for exported file name=>lint error fixed
* sanitization added for exported file name=>lint error fixed
* sanitization added for exported file name=>redundancy removed
* sanitization added for exported file name=>redundancy removed
* reverted to previous commit
* sanitization added for exported file name=>redundancy removed
* exported chat date iso formatted
* conversation export named after room
* conversation export named after room
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* code refacto filename date format
* Add docs to fn
* Bring in a util library for sanitizing
* Extract file naming function and make consistent for all 3 types
Also use the library we dragged in
* Write tests & associated fixes
* Apply linters locally
* Include new date util in index
Co-authored-by: Sinharitik589 <sinharitik18112835@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: yaya-usman <yayaazeez222@gmail.com>
Co-authored-by: Sinharitik589 <67551927+Sinharitik589@users.noreply.github.com>