mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-09 01:30:57 +00:00
Compare commits
7 Commits
v1.11.41
...
t3chguy/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5e7cb2bc7 | ||
|
|
7bb4d91e5c | ||
|
|
c4e4a8357d | ||
|
|
3b1b30dd4f | ||
|
|
1ff5dc7af5 | ||
|
|
4451ff1d6c | ||
|
|
a550341663 |
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
)
|
||||
)
|
||||
steps:
|
||||
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2
|
||||
- uses: tibdex/backport@2e217641d82d02ba0603f46b1aeedefb258890ac # v2
|
||||
with:
|
||||
labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>"
|
||||
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
|
||||
|
||||
56
.github/workflows/build_debian.yaml
vendored
56
.github/workflows/build_debian.yaml
vendored
@@ -1,56 +0,0 @@
|
||||
name: Build Debian package
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
concurrency: ${{ github.workflow }}
|
||||
jobs:
|
||||
build:
|
||||
name: Build package
|
||||
if: github.event.release.prerelease == false
|
||||
environment: packages.element.io
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }}
|
||||
R2_URL: ${{ vars.CF_R2_S3_API }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
mkdir -p /tmp/element-web-debian/DEBIAN
|
||||
cp -R debian/ /tmp/element-web-debian/DEBIAN/
|
||||
mkdir -p /tmp/element-web-debian/usr/share/element-web/
|
||||
|
||||
wget https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz
|
||||
mv element-* /tmp/element-web-debian/usr/share/element-web
|
||||
mv debian/usr/share/element-web/config.sample.json /tmp/element-web-debian/usr/share/element-web/config.json
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
|
||||
- name: Build deb package
|
||||
run: |
|
||||
VERSION=$(cat package.json | jq -r .version)
|
||||
chmod -R u=rw,go=r /tmp/element-web-debian/usr/share/element-web/
|
||||
dpkg-deb -Zxz --root-owner-group -VVersion=$VERSION --build /tmp/element-web-debian element-web.deb
|
||||
|
||||
# For now just upload the artifact to github
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: debs
|
||||
path: "*.deb"
|
||||
retention-days: 14
|
||||
|
||||
#- name: Upload incoming deb
|
||||
# run: aws s3 cp element-io-archive-keyring.deb "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
|
||||
# env:
|
||||
# AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
||||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
||||
|
||||
#reprepro:
|
||||
# needs: build
|
||||
# name: Run reprepro
|
||||
# if: inputs.deploy && github.event.release.prerelease == false
|
||||
# uses: ./.github/workflows/reprepro.yaml
|
||||
# secrets: inherit
|
||||
# with:
|
||||
# incoming: element-web.deb
|
||||
2
.github/workflows/dockerhub.yaml
vendored
2
.github/workflows/dockerhub.yaml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2
|
||||
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
|
||||
213
CHANGELOG.md
213
CHANGELOG.md
@@ -1,216 +1,3 @@
|
||||
Changes in [1.11.41](https://github.com/vector-im/element-web/releases/tag/v1.11.41) (2023-09-12)
|
||||
=================================================================================================
|
||||
|
||||
## 🦖 Deprecations
|
||||
* Deprecate customisations in favour of Module API ([\#25736](https://github.com/vector-im/element-web/pull/25736)). Fixes #25733.
|
||||
|
||||
## ✨ Features
|
||||
* Make SVGR icons use forward ref ([\#26082](https://github.com/vector-im/element-web/pull/26082)).
|
||||
* Add support for rendering a custom wrapper around Element ([\#25537](https://github.com/vector-im/element-web/pull/25537)). Contributed by @maheichyk.
|
||||
* Allow creating public knock rooms ([\#11481](https://github.com/matrix-org/matrix-react-sdk/pull/11481)). Contributed by @charlynguyen.
|
||||
* Render custom images in reactions according to MSC4027 ([\#11087](https://github.com/matrix-org/matrix-react-sdk/pull/11087)). Contributed by @sumnerevans.
|
||||
* Introduce room knocks bar ([\#11475](https://github.com/matrix-org/matrix-react-sdk/pull/11475)). Contributed by @charlynguyen.
|
||||
* Room header UI updates ([\#11507](https://github.com/matrix-org/matrix-react-sdk/pull/11507)). Fixes #25892.
|
||||
* Remove green "verified" bar for encrypted events ([\#11496](https://github.com/matrix-org/matrix-react-sdk/pull/11496)).
|
||||
* Update member count on room summary update ([\#11488](https://github.com/matrix-org/matrix-react-sdk/pull/11488)).
|
||||
* Support for E2EE in Element Call ([\#11492](https://github.com/matrix-org/matrix-react-sdk/pull/11492)).
|
||||
* Allow requesting to join knock rooms via spotlight ([\#11482](https://github.com/matrix-org/matrix-react-sdk/pull/11482)). Contributed by @charlynguyen.
|
||||
* Lock out the first tab if Element is opened in a second tab. ([\#11425](https://github.com/matrix-org/matrix-react-sdk/pull/11425)). Fixes #25157.
|
||||
* Change avatar to use Compound implementation ([\#11448](https://github.com/matrix-org/matrix-react-sdk/pull/11448)).
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix vertical alignment of default avatar font ([\#11582](https://github.com/matrix-org/matrix-react-sdk/pull/11582)). Fixes #26081.
|
||||
* Fix avatars in public room & space search being flex shrunk ([\#11580](https://github.com/matrix-org/matrix-react-sdk/pull/11580)). Fixes #26133.
|
||||
* Fix EventTile avatars being rendered with a size of 0 instead of hidden ([\#11558](https://github.com/matrix-org/matrix-react-sdk/pull/11558)). Fixes #26075.
|
||||
* Fix compound external assets path in bundle ([\#26069](https://github.com/vector-im/element-web/pull/26069)).
|
||||
* Use RoomStateEvent.Update for knocks ([\#11516](https://github.com/matrix-org/matrix-react-sdk/pull/11516)). Contributed by @charlynguyen.
|
||||
* Prevent event propagation when clicking icon buttons ([\#11515](https://github.com/matrix-org/matrix-react-sdk/pull/11515)).
|
||||
* Only display RoomKnocksBar when feature flag is enabled ([\#11513](https://github.com/matrix-org/matrix-react-sdk/pull/11513)). Contributed by @andybalaam.
|
||||
* Fix avatars of knock members for people tab of room settings ([\#11506](https://github.com/matrix-org/matrix-react-sdk/pull/11506)). Fixes #26083. Contributed by @charlynguyen.
|
||||
* Fixes read receipt avatar offset ([\#11483](https://github.com/matrix-org/matrix-react-sdk/pull/11483)). Fixes #26067, #26064 #26059 and #26061.
|
||||
* Fix avatar defects ([\#11473](https://github.com/matrix-org/matrix-react-sdk/pull/11473)). Fixes #26051 and #26046.
|
||||
* Fix consistent avatar output for Percy ([\#11472](https://github.com/matrix-org/matrix-react-sdk/pull/11472)). Fixes #26049 and #26052.
|
||||
* Fix colour of avatar and colour matching with username ([\#11470](https://github.com/matrix-org/matrix-react-sdk/pull/11470)). Fixes #26042.
|
||||
* Fix incompatibility of Soft Logout with Element-R ([\#11468](https://github.com/matrix-org/matrix-react-sdk/pull/11468)).
|
||||
* Fix instances of double translation and guard translation calls using typescript ([\#11443](https://github.com/matrix-org/matrix-react-sdk/pull/11443)).
|
||||
|
||||
Changes in [1.11.40](https://github.com/vector-im/element-web/releases/tag/v1.11.40) (2023-08-29)
|
||||
=================================================================================================
|
||||
|
||||
## ✨ Features
|
||||
* Hide account deactivation for externally managed accounts ([\#11445](https://github.com/matrix-org/matrix-react-sdk/pull/11445)). Fixes #26022. Contributed by @kerryarchibald.
|
||||
* OIDC: Redirect to delegated auth provider when signing out ([\#11432](https://github.com/matrix-org/matrix-react-sdk/pull/11432)). Fixes #26000. Contributed by @kerryarchibald.
|
||||
* Disable 3pid fields in settings when `m.3pid_changes` capability is disabled ([\#11430](https://github.com/matrix-org/matrix-react-sdk/pull/11430)). Fixes #25995. Contributed by @kerryarchibald.
|
||||
* OIDC: disable multi session signout for OIDC-aware servers in session manager ([\#11431](https://github.com/matrix-org/matrix-react-sdk/pull/11431)). Contributed by @kerryarchibald.
|
||||
* Implement updated open dialog method of the Module API ([\#11395](https://github.com/matrix-org/matrix-react-sdk/pull/11395)). Contributed by @dhenneke.
|
||||
* Polish & delabs `Exploring public spaces` feature ([\#11423](https://github.com/matrix-org/matrix-react-sdk/pull/11423)).
|
||||
* Treat lists with a single empty item as plain text, not Markdown. ([\#6833](https://github.com/matrix-org/matrix-react-sdk/pull/6833)). Fixes vector-im/element-meta#1265.
|
||||
* Allow managing room knocks ([\#11404](https://github.com/matrix-org/matrix-react-sdk/pull/11404)). Contributed by @charlynguyen.
|
||||
* Pin the action buttons to the bottom of the scrollable dialogs ([\#11407](https://github.com/matrix-org/matrix-react-sdk/pull/11407)). Contributed by @dhenneke.
|
||||
* Support Matrix 1.1 (drop legacy r0 versions) ([\#9819](https://github.com/matrix-org/matrix-react-sdk/pull/9819)).
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix path separator for Windows based systems ([\#25997](https://github.com/vector-im/element-web/pull/25997)).
|
||||
* Fix instances of double translation and guard translation calls using typescript ([\#11443](https://github.com/matrix-org/matrix-react-sdk/pull/11443)).
|
||||
* Fix export type "Current timeline" to match its behaviour to its name ([\#11426](https://github.com/matrix-org/matrix-react-sdk/pull/11426)). Fixes #25988.
|
||||
* Fix Room Settings > Notifications file upload input being shown superfluously ([\#11415](https://github.com/matrix-org/matrix-react-sdk/pull/11415)). Fixes #18392.
|
||||
* Simplify registration with email validation ([\#11398](https://github.com/matrix-org/matrix-react-sdk/pull/11398)). Fixes #25832 #23601 and #22297.
|
||||
* correct home server URL ([\#11391](https://github.com/matrix-org/matrix-react-sdk/pull/11391)). Fixes #25931. Contributed by @NSV1991.
|
||||
* Include non-matching DMs in Spotlight recent conversations when the DM's userId is part of the search API results ([\#11374](https://github.com/matrix-org/matrix-react-sdk/pull/11374)). Contributed by @mgcm.
|
||||
* Fix useRoomMembers missing updates causing incorrect membership counts ([\#11392](https://github.com/matrix-org/matrix-react-sdk/pull/11392)). Fixes #17096.
|
||||
* Show error when searching public rooms fails ([\#11378](https://github.com/matrix-org/matrix-react-sdk/pull/11378)).
|
||||
|
||||
Changes in [1.11.39](https://github.com/vector-im/element-web/releases/tag/v1.11.39) (2023-08-15)
|
||||
=================================================================================================
|
||||
|
||||
## 🦖 Deprecations
|
||||
* Deprecate camelCase config options ([\#25800](https://github.com/vector-im/element-web/pull/25800)).
|
||||
* Deprecate customisations in favour of Module API ([\#25736](https://github.com/vector-im/element-web/pull/25736)). Fixes #25733.
|
||||
|
||||
## ✨ Features
|
||||
* Update labs.md for knock rooms ([\#25923](https://github.com/vector-im/element-web/pull/25923)). Contributed by @charlynguyen.
|
||||
* Package release builds of element-web in package.element.io debs ([\#25198](https://github.com/vector-im/element-web/pull/25198)).
|
||||
* Allow knocking rooms ([\#11353](https://github.com/matrix-org/matrix-react-sdk/pull/11353)). Contributed by @charlynguyen.
|
||||
* Support adding space-restricted joins on rooms not members of those spaces ([\#9017](https://github.com/matrix-org/matrix-react-sdk/pull/9017)). Fixes #19213.
|
||||
* Clear requiresClient and show pop-out if widget-api fails to ready ([\#11321](https://github.com/matrix-org/matrix-react-sdk/pull/11321)). Fixes vector-im/customer-retainer#73.
|
||||
* Bump pagination sizes due to hidden events ([\#11342](https://github.com/matrix-org/matrix-react-sdk/pull/11342)).
|
||||
* Remove display of key backup signatures from backup settings ([\#11333](https://github.com/matrix-org/matrix-react-sdk/pull/11333)).
|
||||
* Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity ([\#11222](https://github.com/matrix-org/matrix-react-sdk/pull/11222)). Fixes #9478.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix "Export chat" not respecting configured time format in plain text mode ([\#10696](https://github.com/matrix-org/matrix-react-sdk/pull/10696)). Fixes #23838. Contributed by @rashmitpankhania.
|
||||
* Fix some missing 1-count pluralisations around event list summaries ([\#11371](https://github.com/matrix-org/matrix-react-sdk/pull/11371)). Fixes #25925.
|
||||
* Fix create subspace dialog not working for public space creation ([\#11367](https://github.com/matrix-org/matrix-react-sdk/pull/11367)). Fixes #25916.
|
||||
* Search for users on paste ([\#11304](https://github.com/matrix-org/matrix-react-sdk/pull/11304)). Fixes #17523. Contributed by @peterscheu-aceart.
|
||||
* Fix AppTile context menu not always showing up when it has options ([\#11358](https://github.com/matrix-org/matrix-react-sdk/pull/11358)). Fixes #25914.
|
||||
* Fix clicking on home all rooms space notification not working ([\#11337](https://github.com/matrix-org/matrix-react-sdk/pull/11337)). Fixes #22844.
|
||||
* Fix joining a suggested room switching space away ([\#11347](https://github.com/matrix-org/matrix-react-sdk/pull/11347)). Fixes #25838.
|
||||
* Fix home/all rooms context menu in space panel ([\#11350](https://github.com/matrix-org/matrix-react-sdk/pull/11350)). Fixes #25896.
|
||||
* Make keyboard handling in and out of autocomplete completions consistent ([\#11344](https://github.com/matrix-org/matrix-react-sdk/pull/11344)). Fixes #25878.
|
||||
* De-duplicate reactions by sender to account for faulty/malicious servers ([\#11340](https://github.com/matrix-org/matrix-react-sdk/pull/11340)). Fixes #25872.
|
||||
* Fix disable_3pid_login being ignored for the email field ([\#11335](https://github.com/matrix-org/matrix-react-sdk/pull/11335)). Fixes #25863.
|
||||
* Upgrade wysiwyg editor for ctrl+backspace windows fix ([\#11324](https://github.com/matrix-org/matrix-react-sdk/pull/11324)). Fixes vector-im/verticals-internal#102.
|
||||
* Unhide the view source event toggle - it works well enough ([\#11336](https://github.com/matrix-org/matrix-react-sdk/pull/11336)). Fixes #25861.
|
||||
|
||||
Changes in [1.11.38](https://github.com/vector-im/element-web/releases/tag/v1.11.38) (2023-08-04)
|
||||
=================================================================================================
|
||||
|
||||
## ✨ Features
|
||||
* Package release builds of element-web in package.element.io debs ([\#25198](https://github.com/vector-im/element-web/pull/25198)).
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Revert to using the /presence API for presence ([\#11366](https://github.com/matrix-org/matrix-react-sdk/pull/11366))
|
||||
|
||||
Changes in [1.11.37](https://github.com/vector-im/element-web/releases/tag/v1.11.37) (2023-08-01)
|
||||
=================================================================================================
|
||||
|
||||
## 🦖 Deprecations
|
||||
* Deprecate camelCase config options ([\#25800](https://github.com/vector-im/element-web/pull/25800)).
|
||||
* Deprecate customisations in favour of Module API ([\#25736](https://github.com/vector-im/element-web/pull/25736)). Fixes #25733.
|
||||
|
||||
## ✨ Features
|
||||
* Do not show "Forget room" button in Room View header for guest users ([\#10898](https://github.com/matrix-org/matrix-react-sdk/pull/10898)). Contributed by @spantaleev.
|
||||
* Switch to updating presence via /sync calls instead of PUT /presence ([\#11223](https://github.com/matrix-org/matrix-react-sdk/pull/11223)). Fixes #20809 #13877 and #4813.
|
||||
* Fix blockquote colour contrast ([\#11299](https://github.com/matrix-org/matrix-react-sdk/pull/11299)). Fixes matrix-org/element-web-rageshakes#21800.
|
||||
* Don't hide room header buttons in video rooms and rooms with a call ([\#9712](https://github.com/matrix-org/matrix-react-sdk/pull/9712)). Fixes #23900.
|
||||
* OIDC: Persist details in session storage, create store ([\#11302](https://github.com/matrix-org/matrix-react-sdk/pull/11302)). Fixes #25710. Contributed by @kerryarchibald.
|
||||
* Allow setting room join rule to knock ([\#11248](https://github.com/matrix-org/matrix-react-sdk/pull/11248)). Contributed by @charlynguyen.
|
||||
* Retry joins on 524 (Cloudflare timeout) also ([\#11296](https://github.com/matrix-org/matrix-react-sdk/pull/11296)). Fixes #8776.
|
||||
* Make sure users returned by the homeserver search API are displayed. Don't silently drop any. ([\#9556](https://github.com/matrix-org/matrix-react-sdk/pull/9556)). Fixes #24422. Contributed by @maxmalek.
|
||||
* Offer to unban user during invite if inviter has sufficient permissions ([\#11256](https://github.com/matrix-org/matrix-react-sdk/pull/11256)). Fixes #3222.
|
||||
* Split join and goto slash commands, the latter shouldn't auto_join ([\#11259](https://github.com/matrix-org/matrix-react-sdk/pull/11259)). Fixes #10128.
|
||||
* Integration work for rich text editor 2.3.1 ([\#11172](https://github.com/matrix-org/matrix-react-sdk/pull/11172)). Contributed by @alunturner.
|
||||
* Compound color pass ([\#11079](https://github.com/matrix-org/matrix-react-sdk/pull/11079)). Fixes vector-im/internal-planning#450 and #25547.
|
||||
* Warn when demoting self via /op and /deop slash commands ([\#11214](https://github.com/matrix-org/matrix-react-sdk/pull/11214)). Fixes #13726.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Correct Jitsi preferred_domain property ([\#25813](https://github.com/vector-im/element-web/pull/25813)). Contributed by @benbz.
|
||||
* Fix edge case with sent indicator being drawn when it shouldn't be ([\#11320](https://github.com/matrix-org/matrix-react-sdk/pull/11320)).
|
||||
* Use correct translation function for WYSIWYG buttons ([\#11315](https://github.com/matrix-org/matrix-react-sdk/pull/11315)). Fixes vector-im/verticals-internal#109.
|
||||
* Handle empty own profile ([\#11319](https://github.com/matrix-org/matrix-react-sdk/pull/11319)). Fixes #25510.
|
||||
* Fix peeked rooms showing up in historical ([\#11316](https://github.com/matrix-org/matrix-react-sdk/pull/11316)). Fixes #22473.
|
||||
* Ensure consistency when rendering the sent event indicator ([\#11314](https://github.com/matrix-org/matrix-react-sdk/pull/11314)). Fixes #17937.
|
||||
* Prevent re-filtering user directory results in spotlight ([\#11290](https://github.com/matrix-org/matrix-react-sdk/pull/11290)). Fixes #24422.
|
||||
* Fix GIF label on dark theme ([\#11312](https://github.com/matrix-org/matrix-react-sdk/pull/11312)). Fixes #25836.
|
||||
* Fix issues around room notification settings flaking out ([\#11306](https://github.com/matrix-org/matrix-react-sdk/pull/11306)). Fixes #16472 #21309 and #6828.
|
||||
* Fix invite dialog showing the same user multiple times ([\#11308](https://github.com/matrix-org/matrix-react-sdk/pull/11308)). Fixes #25578.
|
||||
* Don't show composer send button if user cannot send ([\#11298](https://github.com/matrix-org/matrix-react-sdk/pull/11298)). Fixes #25825.
|
||||
* Restore color for sender in imageview ([\#11289](https://github.com/matrix-org/matrix-react-sdk/pull/11289)). Fixes #25822.
|
||||
* Fix changelog dialog heading size ([\#11286](https://github.com/matrix-org/matrix-react-sdk/pull/11286)). Fixes #25789.
|
||||
* Restore offline presence badge color ([\#11287](https://github.com/matrix-org/matrix-react-sdk/pull/11287)). Fixes #25792.
|
||||
* Fix bubble message layout avatar overlap ([\#11284](https://github.com/matrix-org/matrix-react-sdk/pull/11284)). Fixes #25818.
|
||||
* Fix voice call tile size ([\#11285](https://github.com/matrix-org/matrix-react-sdk/pull/11285)). Fixes #25684.
|
||||
* Fix layout of sessions tab buttons ([\#11279](https://github.com/matrix-org/matrix-react-sdk/pull/11279)). Fixes #25545.
|
||||
* Don't bother showing redundant tooltip on space menu ([\#11276](https://github.com/matrix-org/matrix-react-sdk/pull/11276)). Fixes #20380.
|
||||
* Remove reply fallback from notifications ([\#11278](https://github.com/matrix-org/matrix-react-sdk/pull/11278)). Fixes #17859.
|
||||
* Populate info.duration for audio & video file uploads ([\#11225](https://github.com/matrix-org/matrix-react-sdk/pull/11225)). Fixes #17720.
|
||||
* Hide widget menu button if it there are no options available ([\#11257](https://github.com/matrix-org/matrix-react-sdk/pull/11257)). Fixes #24826.
|
||||
* Fix colour regressions ([\#11273](https://github.com/matrix-org/matrix-react-sdk/pull/11273)). Fixes #25788, #25808 #25811 and #25812.
|
||||
* Fix room view not properly maintaining scroll position ([\#11274](https://github.com/matrix-org/matrix-react-sdk/pull/11274)). Fixes #25810.
|
||||
* Prevent user from accidentally double clicking user info admin actions ([\#11254](https://github.com/matrix-org/matrix-react-sdk/pull/11254)). Fixes #10944.
|
||||
* Fix missing metaspace notification badges ([\#11269](https://github.com/matrix-org/matrix-react-sdk/pull/11269)). Fixes #25679.
|
||||
* Fix clicking MXID in timeline going to matrix.to ([\#11263](https://github.com/matrix-org/matrix-react-sdk/pull/11263)). Fixes #23342.
|
||||
* Restoring optional ligatures by resetting letter-spacing ([\#11202](https://github.com/matrix-org/matrix-react-sdk/pull/11202)). Fixes #25727.
|
||||
* Allow emoji presentation selector to not break BigEmoji styling ([\#11253](https://github.com/matrix-org/matrix-react-sdk/pull/11253)). Fixes #17848.
|
||||
* Make event highliht use primary content token ([\#11255](https://github.com/matrix-org/matrix-react-sdk/pull/11255)).
|
||||
* Fix event info events size and color ([\#11252](https://github.com/matrix-org/matrix-react-sdk/pull/11252)). Fixes #25778.
|
||||
* Fix color mapping for blockquote border ([\#11251](https://github.com/matrix-org/matrix-react-sdk/pull/11251)). Fixes #25782.
|
||||
* Strip emoji variation when searching emoji by emoji ([\#11221](https://github.com/matrix-org/matrix-react-sdk/pull/11221)). Fixes #18703.
|
||||
|
||||
Changes in [1.11.36](https://github.com/vector-im/element-web/releases/tag/v1.11.36) (2023-07-18)
|
||||
=================================================================================================
|
||||
|
||||
## 🔒 Security
|
||||
* Fixes for [CVE-2023-37259](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-37259) / [GHSA-c9vx-2g7w-rp65](https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-c9vx-2g7w-rp65)
|
||||
|
||||
## 🦖 Deprecations
|
||||
* Deprecate customisations in favour of Module API ([\#25736](https://github.com/vector-im/element-web/pull/25736)). Fixes #25733.
|
||||
|
||||
## ✨ Features
|
||||
* OIDC: store initial screen in session storage ([\#25688](https://github.com/vector-im/element-web/pull/25688)). Fixes #25656. Contributed by @kerryarchibald.
|
||||
* Allow default_server_config as a fallback config ([\#25682](https://github.com/vector-im/element-web/pull/25682)). Contributed by @ShadowRZ.
|
||||
* OIDC: remove auth params from url after login attempt ([\#25664](https://github.com/vector-im/element-web/pull/25664)). Contributed by @kerryarchibald.
|
||||
* feat(faq): remove keyboard shortcuts button ([\#9342](https://github.com/matrix-org/matrix-react-sdk/pull/9342)). Fixes #22625. Contributed by @gefgu.
|
||||
* GYU: Update banner ([\#11211](https://github.com/matrix-org/matrix-react-sdk/pull/11211)). Fixes #25530. Contributed by @justjanne.
|
||||
* Linkify mxc:// URLs as links to your media repo ([\#11213](https://github.com/matrix-org/matrix-react-sdk/pull/11213)). Fixes #6942.
|
||||
* OIDC: Log in ([\#11199](https://github.com/matrix-org/matrix-react-sdk/pull/11199)). Fixes #25657. Contributed by @kerryarchibald.
|
||||
* Handle all permitted url schemes in linkify ([\#11215](https://github.com/matrix-org/matrix-react-sdk/pull/11215)). Fixes #4457 and #8720.
|
||||
* Autoapprove Element Call oidc requests ([\#11209](https://github.com/matrix-org/matrix-react-sdk/pull/11209)). Contributed by @toger5.
|
||||
* Allow creating knock rooms ([\#11182](https://github.com/matrix-org/matrix-react-sdk/pull/11182)). Contributed by @charlynguyen.
|
||||
* Expose and pre-populate thread ID in devtools dialog ([\#10953](https://github.com/matrix-org/matrix-react-sdk/pull/10953)).
|
||||
* Hide URL preview if it will be empty ([\#9029](https://github.com/matrix-org/matrix-react-sdk/pull/9029)).
|
||||
* Change wording from avatar to profile picture ([\#7015](https://github.com/matrix-org/matrix-react-sdk/pull/7015)). Fixes vector-im/element-meta#1331. Contributed by @aaronraimist.
|
||||
* Quick and dirty devtool to explore state history ([\#11197](https://github.com/matrix-org/matrix-react-sdk/pull/11197)).
|
||||
* Consider more user inputs when calculating zxcvbn score ([\#11180](https://github.com/matrix-org/matrix-react-sdk/pull/11180)).
|
||||
* GYU: Account Notification Settings ([\#11008](https://github.com/matrix-org/matrix-react-sdk/pull/11008)). Fixes #24567. Contributed by @justjanne.
|
||||
* Compound Typography pass ([\#11103](https://github.com/matrix-org/matrix-react-sdk/pull/11103)). Fixes #25548.
|
||||
* OIDC: navigate to authorization endpoint ([\#11096](https://github.com/matrix-org/matrix-react-sdk/pull/11096)). Fixes #25574. Contributed by @kerryarchibald.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix read receipt sending behaviour around thread roots ([\#3600](https://github.com/matrix-org/matrix-js-sdk/pull/3600)).
|
||||
* Fix missing metaspace notification badges ([\#11269](https://github.com/matrix-org/matrix-react-sdk/pull/11269)). Fixes #25679.
|
||||
* Make checkboxes less rounded ([\#11224](https://github.com/matrix-org/matrix-react-sdk/pull/11224)). Contributed by @andybalaam.
|
||||
* GYU: Fix issues with audible keywords without activated mentions ([\#11218](https://github.com/matrix-org/matrix-react-sdk/pull/11218)). Contributed by @justjanne.
|
||||
* PosthogAnalytics unwatch settings on logout ([\#11207](https://github.com/matrix-org/matrix-react-sdk/pull/11207)). Fixes #25703.
|
||||
* Avoid trying to set room account data for pinned events as guest ([\#11216](https://github.com/matrix-org/matrix-react-sdk/pull/11216)). Fixes #6300.
|
||||
* GYU: Disable sound for DMs checkbox when DM notifications are disabled ([\#11210](https://github.com/matrix-org/matrix-react-sdk/pull/11210)). Contributed by @justjanne.
|
||||
* force to allow calls without video and audio in embedded mode ([\#11131](https://github.com/matrix-org/matrix-react-sdk/pull/11131)). Contributed by @EnricoSchw.
|
||||
* Fix room tile text clipping ([\#11196](https://github.com/matrix-org/matrix-react-sdk/pull/11196)). Fixes #25718.
|
||||
* Handle newlines in user pills ([\#11166](https://github.com/matrix-org/matrix-react-sdk/pull/11166)). Fixes #10994.
|
||||
* Limit width of user menu in space panel ([\#11192](https://github.com/matrix-org/matrix-react-sdk/pull/11192)). Fixes #22627.
|
||||
* Add isLocation to ComposerEvent analytics events ([\#11187](https://github.com/matrix-org/matrix-react-sdk/pull/11187)). Contributed by @andybalaam.
|
||||
* Fix: hide unsupported login elements ([\#11185](https://github.com/matrix-org/matrix-react-sdk/pull/11185)). Fixes #25711. Contributed by @kerryarchibald.
|
||||
* Scope smaller font size to user info panel ([\#11178](https://github.com/matrix-org/matrix-react-sdk/pull/11178)). Fixes #25683.
|
||||
* Apply i18n to strings in the html export ([\#11176](https://github.com/matrix-org/matrix-react-sdk/pull/11176)).
|
||||
* Inhibit url previews on MXIDs containing slashes same as those without ([\#11160](https://github.com/matrix-org/matrix-react-sdk/pull/11160)).
|
||||
* Make event info size consistent with state events ([\#11181](https://github.com/matrix-org/matrix-react-sdk/pull/11181)).
|
||||
* Fix markdown content spacing ([\#11177](https://github.com/matrix-org/matrix-react-sdk/pull/11177)). Fixes #25685.
|
||||
* Fix font-family definition for emojis ([\#11170](https://github.com/matrix-org/matrix-react-sdk/pull/11170)). Fixes #25686.
|
||||
* Fix spurious error sending receipt in thread errors ([\#11157](https://github.com/matrix-org/matrix-react-sdk/pull/11157)).
|
||||
* Consider the empty push rule actions array equiv to deprecated dont_notify ([\#11155](https://github.com/matrix-org/matrix-react-sdk/pull/11155)). Fixes #25674.
|
||||
* Only trap escape key for cancel reply if there is a reply ([\#11140](https://github.com/matrix-org/matrix-react-sdk/pull/11140)). Fixes #25640.
|
||||
* Update linkify to 4.1.1 ([\#11132](https://github.com/matrix-org/matrix-react-sdk/pull/11132)). Fixes #23806.
|
||||
|
||||
Changes in [1.11.35](https://github.com/vector-im/element-web/releases/tag/v1.11.35) (2023-07-04)
|
||||
=================================================================================================
|
||||
|
||||
|
||||
@@ -10,18 +10,20 @@ module.exports = {
|
||||
"last 2 Safari versions",
|
||||
"last 2 Edge versions",
|
||||
],
|
||||
include: [
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
],
|
||||
},
|
||||
],
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-typescript", { allowDeclareFields: true }],
|
||||
"@babel/preset-react",
|
||||
],
|
||||
plugins: [
|
||||
"@babel/plugin-proposal-export-default-from",
|
||||
"@babel/plugin-proposal-numeric-separator",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-proposal-object-rest-spread",
|
||||
"@babel/plugin-proposal-optional-chaining",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||
|
||||
// transform logical assignment (??=, ||=, &&=). preset-env doesn't
|
||||
// normally bother with these (presumably because all the target
|
||||
|
||||
1
debian/conffiles
vendored
1
debian/conffiles
vendored
@@ -1 +0,0 @@
|
||||
/usr/share/element-web/config.json
|
||||
12
debian/control
vendored
12
debian/control
vendored
@@ -1,12 +0,0 @@
|
||||
Package: element-web
|
||||
License: Apache-2.0
|
||||
Vendor: support@element.io
|
||||
Architecture: all
|
||||
Maintainer: support@element.io
|
||||
Recommends: element-io-archive-keyring
|
||||
Section: web
|
||||
Priority: optional
|
||||
Homepage: https://element.io/
|
||||
Version: ${Version}
|
||||
Description:
|
||||
A feature-rich client for Matrix.org
|
||||
51
docs/labs.md
51
docs/labs.md
@@ -86,6 +86,11 @@ present in the room. The Bridge info tab pulls information from the `m.bridge` s
|
||||
bridges are not expected to be compatible, and users should not rely on this
|
||||
tab as the single source of truth just yet.
|
||||
|
||||
## Presence indicator in room list (`feature_presence_in_room_list`)
|
||||
|
||||
This adds a presence indicator in the room list next to DM rooms where the other
|
||||
person is online.
|
||||
|
||||
## Custom themes (`feature_custom_themes`)
|
||||
|
||||
Custom themes are possible through Element's [theme support](./theming.md), though
|
||||
@@ -100,6 +105,35 @@ For some sample themes, check out [aaronraimist/element-themes](https://github.c
|
||||
Allows users to receive encrypted messages by creating a device that is stored
|
||||
encrypted on the server, as described in [MSC2697](https://github.com/matrix-org/matrix-doc/pull/2697).
|
||||
|
||||
## Spotlight search (`feature_spotlight`) [In Development]
|
||||
|
||||
Switches to a new room search experience.
|
||||
|
||||
## Extensible events rendering (`feature_extensible_events`) [In Development]
|
||||
|
||||
_Intended for developer use only at the moment._
|
||||
|
||||
Extensible Events are a [new event format](https://github.com/matrix-org/matrix-doc/pull/1767) which
|
||||
supports graceful fallback in unknown event types. Instead of rendering nothing or a blank space, events
|
||||
can define a series of other events which represent the event's information but in different ways. The
|
||||
base of these fallbacks being text.
|
||||
|
||||
Turning this flag on indicates that, when possible, the extensible events structure should be parsed on
|
||||
supported event types. This should lead to zero perceptual change in the timeline except in cases where
|
||||
the sender is using unknown/unrecognised event types.
|
||||
|
||||
Sending events with extensible events structure is always enabled - this should not affect any downstream
|
||||
client.
|
||||
|
||||
## Right panel stays open (`feature_right_panel_default_open`)
|
||||
|
||||
This is an experimental default open right panel mode as a quick fix for those
|
||||
who prefer to have the right panel open consistently across rooms.
|
||||
|
||||
If no right panel state is known for the room or it was closed on the last room
|
||||
visit, it will default to the room member list. Otherwise, the saved card last
|
||||
used in that room is shown.
|
||||
|
||||
## Live location sharing (`feature_location_share_live`) [In Development]
|
||||
|
||||
Enables sharing your current location to the timeline, with live updates.
|
||||
@@ -124,16 +158,17 @@ If you're enabling this at the deployment level, you may also want to reference
|
||||
|
||||
Enables rendering of MD / HTML in room topics.
|
||||
|
||||
## Exploring public spaces (`feature_exploring_public_spaces`)
|
||||
|
||||
Enables exploring public spaces in the new search dialog. Requires the server to
|
||||
have [MSC3827](https://github.com/matrix-org/matrix-spec-proposals/pull/3827) enabled.
|
||||
|
||||
## Sign in another device by showing a QR code (`feature_qr_signin_reciprocate_show`)
|
||||
|
||||
Add capability to the session/device manager screens to generate a QR code to sign in another device + set up E2EE. This requires the homeserver to have support for [MSC3882](https://github.com/matrix-org/matrix-spec-proposals/pull/3882) and [MSC3886](https://github.com/matrix-org/matrix-spec-proposals/pull/3886) enabled.
|
||||
|
||||
## Use the Rust cryptography implementation (`feature_rust_crypto`) [In Development]
|
||||
|
||||
Configures Element to use a new cryptography implementation based on the [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk).
|
||||
|
||||
This setting is (currently) _sticky_ to a user's session: it only takes effect when the user logs in to a new session. Likewise, even after disabling the setting in `config.json`, the Rust implemention will remain in use until users log out.
|
||||
|
||||
## New room header & details (`feature_new_room_decoration_ui`) [In Development]
|
||||
|
||||
Refactors visually the room header and room sidebar
|
||||
|
||||
## Knock rooms (`feature_ask_to_join`) [In Development]
|
||||
|
||||
Enables knock feature for rooms. This allows users to ask to join a room.
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
],
|
||||
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||
"uisi_autorageshake_app": "element-auto-uisi",
|
||||
"show_labs_settings": false,
|
||||
"room_directory": {
|
||||
"showLabsSettings": false,
|
||||
"roomDirectory": {
|
||||
"servers": ["matrix.org", "gitter.im", "libera.chat"]
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
@@ -39,8 +39,8 @@
|
||||
}
|
||||
],
|
||||
"posthog": {
|
||||
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
|
||||
"api_host": "https://posthog.element.io"
|
||||
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
|
||||
"apiHost": "https://posthog.element.io"
|
||||
},
|
||||
"privacy_policy_url": "https://element.io/cookie-policy",
|
||||
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
],
|
||||
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||
"uisi_autorageshake_app": "element-auto-uisi",
|
||||
"show_labs_settings": true,
|
||||
"room_directory": {
|
||||
"showLabsSettings": true,
|
||||
"roomDirectory": {
|
||||
"servers": ["matrix.org", "gitter.im", "libera.chat"]
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
@@ -43,11 +43,12 @@
|
||||
"environment": "develop"
|
||||
},
|
||||
"posthog": {
|
||||
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
|
||||
"api_host": "https://posthog.element.io"
|
||||
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
|
||||
"apiHost": "https://posthog.element.io"
|
||||
},
|
||||
"privacy_policy_url": "https://element.io/cookie-policy",
|
||||
"features": {
|
||||
"feature_spotlight": true,
|
||||
"feature_video_rooms": true
|
||||
},
|
||||
"element_call": {
|
||||
|
||||
@@ -25,7 +25,7 @@ const config: Config = {
|
||||
},
|
||||
testMatch: ["<rootDir>/test/**/*-test.[tj]s?(x)"],
|
||||
setupFiles: ["jest-canvas-mock"],
|
||||
setupFilesAfterEnv: ["<rootDir>/node_modules/matrix-react-sdk/test/setupTests.ts"],
|
||||
setupFilesAfterEnv: ["<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"],
|
||||
moduleNameMapper: {
|
||||
"\\.(css|scss|pcss)$": "<rootDir>/__mocks__/cssMock.js",
|
||||
"\\.(gif|png|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
|
||||
|
||||
@@ -185,20 +185,9 @@ function getModuleApiVersionFor(moduleName: string): string {
|
||||
return findDepVersionInPackageJson(moduleApiDepName, pkgJsonStr);
|
||||
}
|
||||
|
||||
// A list of Module API versions that are supported in addition to the currently installed one
|
||||
// defined in the package.json. This is necessary because semantic versioning is applied to both
|
||||
// the Module-side surface of the API and the Client-side surface of the API. So breaking changes
|
||||
// in the Client-side surface lead to a major bump even though the Module-side surface stays
|
||||
// compatible. We aim to not break the Module-side surface so we maintain a list of compatible
|
||||
// older versions.
|
||||
const backwardsCompatibleMajorVersions = ["1.0.0"];
|
||||
|
||||
function isModuleVersionCompatible(ourApiVersion: string, moduleApiVersion: string): boolean {
|
||||
if (!moduleApiVersion) return false;
|
||||
return (
|
||||
semver.satisfies(ourApiVersion, moduleApiVersion) ||
|
||||
backwardsCompatibleMajorVersions.some((version) => semver.satisfies(version, moduleApiVersion))
|
||||
);
|
||||
return semver.satisfies(ourApiVersion, moduleApiVersion);
|
||||
}
|
||||
|
||||
function writeModulesTs(content: string): void {
|
||||
|
||||
27
package.json
27
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "element-web",
|
||||
"version": "1.11.41",
|
||||
"version": "1.11.35",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"repository": {
|
||||
@@ -36,7 +36,7 @@
|
||||
"clean": "rimraf lib webapp",
|
||||
"build": "yarn clean && yarn build:genfiles && yarn build:bundle",
|
||||
"build-stats": "yarn clean && yarn build:genfiles && yarn build:bundle-stats",
|
||||
"build:jitsi": "ts-node scripts/build-jitsi.ts",
|
||||
"build:jitsi": "node scripts/build-jitsi.js",
|
||||
"build:res": "node scripts/copy-res.js",
|
||||
"build:genfiles": "yarn build:res && yarn build:jitsi && yarn build:module_system",
|
||||
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||
@@ -61,7 +61,7 @@
|
||||
"lint:style": "stylelint \"res/css/**/*.pcss\"",
|
||||
"test": "jest",
|
||||
"coverage": "yarn test --coverage",
|
||||
"analyse:unused-exports": "ts-node ./scripts/analyse_unused_exports.ts",
|
||||
"analyse:unused-exports": "node ./scripts/analyse_unused_exports.js",
|
||||
"analyse:webpack-bundles": "webpack-bundle-analyzer webpack-stats.json webapp"
|
||||
},
|
||||
"resolutions": {
|
||||
@@ -70,15 +70,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
|
||||
"@matrix-org/react-sdk-module-api": "^2.1.0",
|
||||
"@matrix-org/react-sdk-module-api": "^1.0.0",
|
||||
"gfm.css": "^1.1.2",
|
||||
"jsrsasign": "^10.5.25",
|
||||
"katex": "^0.16.0",
|
||||
"matrix-js-sdk": "28.1.0",
|
||||
"matrix-react-sdk": "3.80.0",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
||||
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
|
||||
"matrix-widget-api": "^1.3.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"sanitize-html": "^2.3.2",
|
||||
"ua-parser-js": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -109,9 +110,9 @@
|
||||
"@types/jsrsasign": "^10.5.4",
|
||||
"@types/modernizr": "^3.5.3",
|
||||
"@types/node": "^16",
|
||||
"@types/node-fetch": "^2.6.4",
|
||||
"@types/react": "17.0.58",
|
||||
"@types/react-dom": "17.0.19",
|
||||
"@types/sanitize-html": "^2.3.1",
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.45.0",
|
||||
@@ -123,15 +124,15 @@
|
||||
"cpx": "^1.5.0",
|
||||
"css-loader": "^4",
|
||||
"dotenv": "^16.0.2",
|
||||
"eslint": "8.45.0",
|
||||
"eslint": "8.43.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-deprecate": "^0.7.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-matrix-org": "^1.0.0",
|
||||
"eslint-plugin-react": "^7.28.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"eslint-plugin-unicorn": "^48.0.0",
|
||||
"eslint-plugin-unicorn": "^47.0.0",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
"fake-indexeddb": "^4.0.0",
|
||||
"fetch-mock-jest": "^1.5.1",
|
||||
@@ -146,7 +147,7 @@
|
||||
"json-loader": "^0.5.7",
|
||||
"loader-utils": "^3.0.0",
|
||||
"matrix-mock-request": "^2.5.0",
|
||||
"matrix-web-i18n": "^2.0.0",
|
||||
"matrix-web-i18n": "^1.4.0",
|
||||
"mini-css-extract-plugin": "^1",
|
||||
"minimist": "^1.2.6",
|
||||
"mkdirp": "^3.0.0",
|
||||
@@ -164,10 +165,10 @@
|
||||
"postcss-scss": "^4.0.4",
|
||||
"postcss-simple-vars": "^5.0.2",
|
||||
"prettier": "2.8.8",
|
||||
"proxy-agent": "^6.3.0",
|
||||
"raw-loader": "^4.0.2",
|
||||
"rimraf": "^5.0.0",
|
||||
"semver": "^7.5.2",
|
||||
"simple-proxy-agent": "^1.1.0",
|
||||
"string-replace-loader": "3",
|
||||
"style-loader": "2",
|
||||
"stylelint": "^15.10.1",
|
||||
@@ -176,7 +177,7 @@
|
||||
"terser-webpack-plugin": "^4.0.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"ts-prune": "^0.10.3",
|
||||
"typescript": "5.1.6",
|
||||
"typescript": "5.0.4",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-bundle-analyzer": "^4.8.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
import * as fs from "node:fs";
|
||||
import { exec } from "node:child_process";
|
||||
const fs = require("fs");
|
||||
const { exec } = require("node:child_process");
|
||||
|
||||
const includeJSSDK = process.argv.includes("--include-js-sdk");
|
||||
const ignore: string[] = [];
|
||||
const ignore = [];
|
||||
|
||||
ignore.push(...Object.values<string>(JSON.parse(fs.readFileSync(`${__dirname}/../components.json`, "utf-8"))));
|
||||
ignore.push(...Object.values(JSON.parse(fs.readFileSync(`${__dirname}/../components.json`))));
|
||||
ignore.push("/index.ts");
|
||||
// We ignore js-sdk by default as it may export for other non element-web projects
|
||||
if (!includeJSSDK) ignore.push("matrix-js-sdk");
|
||||
@@ -30,7 +31,7 @@ exec(command, (error, stdout, stderr) => {
|
||||
// won't have an "/" character at the start, so we try to fix that for
|
||||
// better UX
|
||||
// TODO: This might break on Windows
|
||||
lines = lines.reduce<string[]>((newLines, line) => {
|
||||
lines = lines.reduce((newLines, line) => {
|
||||
if (!line.startsWith("/")) newLines.push("/" + line);
|
||||
else newLines.push(line);
|
||||
return newLines;
|
||||
@@ -3,11 +3,11 @@
|
||||
// due to file associations in Windows.
|
||||
// Sorry.
|
||||
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import { mkdirpSync } from "mkdirp";
|
||||
import fetch from "node-fetch";
|
||||
import { ProxyAgent } from "proxy-agent";
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { mkdirpSync } = require("mkdirp");
|
||||
const fetch = require("node-fetch");
|
||||
const ProxyAgent = require("simple-proxy-agent");
|
||||
|
||||
console.log("Making webapp directory");
|
||||
mkdirpSync("webapp");
|
||||
@@ -16,12 +16,15 @@ mkdirpSync("webapp");
|
||||
console.log("Downloading Jitsi script");
|
||||
const fname = path.join("webapp", "jitsi_external_api.min.js");
|
||||
|
||||
fetch("https://meet.element.io/libs/external_api.min.js", {
|
||||
agent: new ProxyAgent(),
|
||||
})
|
||||
const options = {};
|
||||
if (process.env.HTTPS_PROXY) {
|
||||
options.agent = new ProxyAgent(process.env.HTTPS_PROXY, { tunnel: true });
|
||||
}
|
||||
|
||||
fetch("https://meet.element.io/libs/external_api.min.js", options)
|
||||
.then((res) => {
|
||||
const stream = fs.createWriteStream(fname);
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
res.body.pipe(stream);
|
||||
res.body.on("error", (err) => reject(err));
|
||||
res.body.on("finish", () => resolve());
|
||||
1
scripts/check-i18n.pl
Symbolic link
1
scripts/check-i18n.pl
Symbolic link
@@ -0,0 +1 @@
|
||||
../../matrix-react-sdk/scripts/check-i18n.pl
|
||||
@@ -5,56 +5,58 @@ const loaderUtils = require("loader-utils");
|
||||
// copies the resources into the webapp directory.
|
||||
//
|
||||
|
||||
// Languages are listed manually, so we can choose when to include a translation in the app
|
||||
// (because having a translation with only 3 strings translated is just frustrating)
|
||||
// This could readily be automated, but it's nice to explicitly control when new languages are available.
|
||||
// Languages are listed manually so we can choose when to include
|
||||
// a translation in the app (because having a translation with only
|
||||
// 3 strings translated is just frustrating)
|
||||
// This could readily be automated, but it's nice to explicitly
|
||||
// control when new languages are available.
|
||||
const INCLUDE_LANGS = [
|
||||
"bg",
|
||||
"ca",
|
||||
"cs",
|
||||
"da",
|
||||
"de_DE",
|
||||
"el",
|
||||
"en_EN",
|
||||
"en_US",
|
||||
"eo",
|
||||
"es",
|
||||
"et",
|
||||
"eu",
|
||||
"fi",
|
||||
"fr",
|
||||
"gl",
|
||||
"he",
|
||||
"hi",
|
||||
"hu",
|
||||
"id",
|
||||
"is",
|
||||
"it",
|
||||
"ja",
|
||||
"kab",
|
||||
"ko",
|
||||
"lo",
|
||||
"lt",
|
||||
"lv",
|
||||
"nb_NO",
|
||||
"nl",
|
||||
"nn",
|
||||
"pl",
|
||||
"pt",
|
||||
"pt_BR",
|
||||
"ru",
|
||||
"sk",
|
||||
"sq",
|
||||
"sr",
|
||||
"sv",
|
||||
"te",
|
||||
"th",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi",
|
||||
"vls",
|
||||
"zh_Hans",
|
||||
"zh_Hant",
|
||||
{ value: "bg", label: "Български" },
|
||||
{ value: "ca", label: "Català" },
|
||||
{ value: "cs", label: "čeština" },
|
||||
{ value: "da", label: "Dansk" },
|
||||
{ value: "de_DE", label: "Deutsch" },
|
||||
{ value: "el", label: "Ελληνικά" },
|
||||
{ value: "en_EN", label: "English" },
|
||||
{ value: "en_US", label: "English (US)" },
|
||||
{ value: "eo", label: "Esperanto" },
|
||||
{ value: "es", label: "Español" },
|
||||
{ value: "et", label: "Eesti" },
|
||||
{ value: "eu", label: "Euskara" },
|
||||
{ value: "fi", label: "Suomi" },
|
||||
{ value: "fr", label: "Français" },
|
||||
{ value: "gl", label: "Galego" },
|
||||
{ value: "he", label: "עברית" },
|
||||
{ value: "hi", label: "हिन्दी" },
|
||||
{ value: "hu", label: "Magyar" },
|
||||
{ value: "id", label: "Bahasa Indonesia" },
|
||||
{ value: "is", label: "íslenska" },
|
||||
{ value: "it", label: "Italiano" },
|
||||
{ value: "ja", label: "日本語" },
|
||||
{ value: "kab", label: "Taqbaylit" },
|
||||
{ value: "ko", label: "한국어" },
|
||||
{ value: "lo", label: "ລາວ" },
|
||||
{ value: "lt", label: "Lietuvių" },
|
||||
{ value: "lv", label: "Latviešu" },
|
||||
{ value: "nb_NO", label: "Norwegian Bokmål" },
|
||||
{ value: "nl", label: "Nederlands" },
|
||||
{ value: "nn", label: "Norsk Nynorsk" },
|
||||
{ value: "pl", label: "Polski" },
|
||||
{ value: "pt", label: "Português" },
|
||||
{ value: "pt_BR", label: "Português do Brasil" },
|
||||
{ value: "ru", label: "Русский" },
|
||||
{ value: "sk", label: "Slovenčina" },
|
||||
{ value: "sq", label: "Shqip" },
|
||||
{ value: "sr", label: "српски" },
|
||||
{ value: "sv", label: "Svenska" },
|
||||
{ value: "te", label: "తెలుగు" },
|
||||
{ value: "th", label: "ไทย" },
|
||||
{ value: "tr", label: "Türkçe" },
|
||||
{ value: "uk", label: "українська мова" },
|
||||
{ value: "vi", label: "Tiếng Việt" },
|
||||
{ value: "vls", label: "West-Vlaams" },
|
||||
{ value: "zh_Hans", label: "简体中文" }, // simplified chinese
|
||||
{ value: "zh_Hant", label: "繁體中文" }, // traditional chinese
|
||||
];
|
||||
|
||||
// cpx includes globbed parts of the filename in the destination, but excludes
|
||||
@@ -79,6 +81,7 @@ const parseArgs = require("minimist");
|
||||
const Cpx = require("cpx");
|
||||
const chokidar = require("chokidar");
|
||||
const fs = require("fs");
|
||||
const rimraf = require("rimraf");
|
||||
|
||||
const argv = parseArgs(process.argv.slice(2), {});
|
||||
|
||||
@@ -155,7 +158,7 @@ function genLangFile(lang, dest) {
|
||||
const reactSdkFile = "node_modules/matrix-react-sdk/src/i18n/strings/" + lang + ".json";
|
||||
const riotWebFile = "src/i18n/strings/" + lang + ".json";
|
||||
|
||||
const translations = {};
|
||||
let translations = {};
|
||||
[reactSdkFile, riotWebFile].forEach(function (f) {
|
||||
if (fs.existsSync(f)) {
|
||||
try {
|
||||
@@ -167,6 +170,8 @@ function genLangFile(lang, dest) {
|
||||
}
|
||||
});
|
||||
|
||||
translations = weblateToCounterpart(translations);
|
||||
|
||||
const json = JSON.stringify(translations, null, 4);
|
||||
const jsonBuffer = Buffer.from(json);
|
||||
const digest = loaderUtils.getHashDigest(jsonBuffer, null, null, 7);
|
||||
@@ -183,12 +188,12 @@ function genLangFile(lang, dest) {
|
||||
function genLangList(langFileMap) {
|
||||
const languages = {};
|
||||
INCLUDE_LANGS.forEach(function (lang) {
|
||||
const normalizedLanguage = lang.toLowerCase().replace("_", "-");
|
||||
const normalizedLanguage = lang.value.toLowerCase().replace("_", "-");
|
||||
const languageParts = normalizedLanguage.split("-");
|
||||
if (languageParts.length == 2 && languageParts[0] == languageParts[1]) {
|
||||
languages[languageParts[0]] = langFileMap[lang];
|
||||
languages[languageParts[0]] = { fileName: langFileMap[lang.value], label: lang.label };
|
||||
} else {
|
||||
languages[normalizedLanguage] = langFileMap[lang];
|
||||
languages[normalizedLanguage] = { fileName: langFileMap[lang.value], label: lang.label };
|
||||
}
|
||||
});
|
||||
fs.writeFile("webapp/i18n/languages.json", JSON.stringify(languages, null, 4), function (err) {
|
||||
@@ -202,11 +207,51 @@ function genLangList(langFileMap) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* watch the input files for a given language,
|
||||
* regenerate the file, adding its content-hashed filename to langFileMap
|
||||
* and regenerating languages.json with the new filename
|
||||
/**
|
||||
* Convert translation key from weblate format
|
||||
* (which only supports a single level) to counterpart
|
||||
* which requires object values for 'count' translations.
|
||||
*
|
||||
* eg.
|
||||
* "there are %(count)s badgers|one": "a badger",
|
||||
* "there are %(count)s badgers|other": "%(count)s badgers"
|
||||
* becomes
|
||||
* "there are %(count)s badgers": {
|
||||
* "one": "a badger",
|
||||
* "other": "%(count)s badgers"
|
||||
* }
|
||||
*/
|
||||
function weblateToCounterpart(inTrs) {
|
||||
const outTrs = {};
|
||||
|
||||
for (const key of Object.keys(inTrs)) {
|
||||
const keyParts = key.split("|", 2);
|
||||
if (keyParts.length === 2) {
|
||||
let obj = outTrs[keyParts[0]];
|
||||
if (obj === undefined) {
|
||||
obj = outTrs[keyParts[0]] = {};
|
||||
} else if (typeof obj === "string") {
|
||||
// This is a transitional edge case if a string went from singular to pluralised and both still remain
|
||||
// in the translation json file. Use the singular translation as `other` and merge pluralisation atop.
|
||||
obj = outTrs[keyParts[0]] = {
|
||||
other: inTrs[key],
|
||||
};
|
||||
console.warn("Found entry in i18n file in both singular and pluralised form", keyParts[0]);
|
||||
}
|
||||
obj[keyParts[1]] = inTrs[key];
|
||||
} else {
|
||||
outTrs[key] = inTrs[key];
|
||||
}
|
||||
}
|
||||
|
||||
return outTrs;
|
||||
}
|
||||
|
||||
/**
|
||||
watch the input files for a given language,
|
||||
regenerate the file, adding its content-hashed filename to langFileMap
|
||||
and regenerating languages.json with the new filename
|
||||
*/
|
||||
function watchLanguage(lang, dest, langFileMap) {
|
||||
const reactSdkFile = "node_modules/matrix-react-sdk/src/i18n/strings/" + lang + ".json";
|
||||
const riotWebFile = "src/i18n/strings/" + lang + ".json";
|
||||
@@ -234,8 +279,8 @@ function watchLanguage(lang, dest, langFileMap) {
|
||||
// language resources
|
||||
const I18N_DEST = "webapp/i18n/";
|
||||
const I18N_FILENAME_MAP = INCLUDE_LANGS.reduce((m, l) => {
|
||||
const filename = genLangFile(l, I18N_DEST);
|
||||
m[l] = filename;
|
||||
const filename = genLangFile(l.value, I18N_DEST);
|
||||
m[l.value] = filename;
|
||||
return m;
|
||||
}, {});
|
||||
genLangList(I18N_FILENAME_MAP);
|
||||
|
||||
6
src/@types/global.d.ts
vendored
6
src/@types/global.d.ts
vendored
@@ -55,6 +55,12 @@ declare global {
|
||||
on(channel: ElectronChannel, listener: (event: Event, ...args: any[]) => void): void;
|
||||
send(channel: ElectronChannel, ...args: any[]): void;
|
||||
}
|
||||
|
||||
interface Navigator {
|
||||
// PWA badging extensions https://w3c.github.io/badging/
|
||||
setAppBadge?(count: number): Promise<void>;
|
||||
clearAppBadge?(): Promise<void>;
|
||||
}
|
||||
}
|
||||
|
||||
// add method which is missing from the node typing
|
||||
|
||||
@@ -14,14 +14,13 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ReactNode } from "react";
|
||||
import * as React from "react";
|
||||
import { _t } from "matrix-react-sdk/src/languageHandler";
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
import { _t } from "../../languageHandler";
|
||||
|
||||
// directly import the style here as this layer does not support rethemedex at this time so no matrix-react-sdk
|
||||
// PostCSS variables will be accessible.
|
||||
import "../../../res/css/structures/ErrorView.pcss";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
interface IProps {
|
||||
onAccept(): void;
|
||||
@@ -113,13 +112,15 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
|
||||
<h2 id="step1_heading">{_t("Your browser can't run %(brand)s", { brand })}</h2>
|
||||
<p>
|
||||
{_t(
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.",
|
||||
"%(brand)s uses advanced browser features which aren't " +
|
||||
"supported by your current browser.",
|
||||
{ brand },
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.",
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, " +
|
||||
"or <safariLink>Safari</safariLink> for the best experience.",
|
||||
{},
|
||||
{
|
||||
chromeLink: (sub) => <a href="https://www.google.com/chrome">{sub}</a>,
|
||||
@@ -130,7 +131,8 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.",
|
||||
"You can continue using your current browser, but some or all features may not work " +
|
||||
"and the look and feel of the application may be incorrect.",
|
||||
)}
|
||||
</p>
|
||||
<button onClick={onAccept}>{_t("I understand the risks and wish to continue")}</button>
|
||||
|
||||
@@ -15,8 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
import { _t } from "../../languageHandler";
|
||||
import { _t } from "matrix-react-sdk/src/languageHandler";
|
||||
|
||||
// directly import the style here as this layer does not support rethemedex at this time so no matrix-react-sdk
|
||||
// PostCSS variables will be accessible.
|
||||
|
||||
@@ -17,8 +17,7 @@ limitations under the License.
|
||||
|
||||
import React, { ReactElement } from "react";
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
import { _t } from "../../../languageHandler";
|
||||
import { _t } from "matrix-react-sdk/src/languageHandler";
|
||||
|
||||
const VectorAuthFooter = (): ReactElement => {
|
||||
const brandingConfig = SdkConfig.getObject("branding");
|
||||
|
||||
@@ -1 +1 @@
|
||||
{}
|
||||
{}
|
||||
@@ -27,6 +27,5 @@
|
||||
"Use %(brand)s on mobile": "Používání %(brand)s v mobilních zařízeních",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Decentralizovaný, šifrovaný chat a spolupráce na platformě $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s na %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Neplatná konfigurace: default_hs_url nelze použít spolu s default_server_name nebo default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"Invalid configuration: no default server specified.": "Ungültige Konfiguration: Es wurde kein Standardserver angegeben.",
|
||||
"The message from the parser is: %(message)s": "Die Nachricht des Parsers ist: %(message)s",
|
||||
"Invalid JSON": "Ungültiges JSON",
|
||||
"Go to your browser to complete Sign In": "Browser öffnen, um die Anmeldung abzuschließen",
|
||||
"Go to your browser to complete Sign In": "Gehe zu deinem Browser, um die Anmeldung abzuschließen",
|
||||
"Unable to load config file: please refresh the page to try again.": "Konfigurationsdatei kann nicht geladen werden: Bitte aktualisiere die Seite, um es erneut zu versuchen.",
|
||||
"Unsupported browser": "Nicht unterstützter Browser",
|
||||
"Go to element.io": "Gehe zu element.io",
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Your Element is misconfigured": "Anda salah mengatur Element",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Obrolan & kolaborasi terdesentralisasi dan terenkripsi diberdayakan oleh $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s di %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Konfigurasi tidak valid: default_hs_url tidak dapat ditentukan bersama dengan default_server_name atau default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Use %(brand)s on mobile": "Usa %(brand)s su mobile",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Chat e collaborazioni criptate e decentralizzate offerte da $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s su %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Configurazione non valida: default_hs_url non può essere specificato assieme a default_server_name o default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s იყენებს ბრაუზერის გაფართოებულ ფუნქციებს, რომლებიც არ არის მხარდაჭერილი თქვენი ამჟამინდელი ბრაუზერის მიერ.",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s %(osName)s-ზე",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s სამუშაო მაგიდა: %(platformName)s",
|
||||
"The message from the parser is: %(message)s": "პარსერის შეტყობინებაა: %(message)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "არასწორი კონფიგურაცია: default_hs_url არ შეიძლება მითითებული იყოს default_server_name ან default_server_config-თან ერთად"
|
||||
"The message from the parser is: %(message)s": "პარსერის შეტყობინებაა: %(message)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Your Element is misconfigured": "당신의 Element가 잘못 설정되었습니다",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "$matrixLogo 에서 제공하는 탈중앙화되고 암호화된 협업",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(osName)s 의 %(browserName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s 데스크탑: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "구성이 잘못되었습니다: default_server_name 또는 default_server_config와 함께 default_hs_url을 지정할 수 없습니다."
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s 데스크탑: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Dismiss": "Atmest",
|
||||
"Dismiss": "Aizvērt",
|
||||
"Unknown device": "Nezināma ierīce",
|
||||
"Welcome to Element": "Laipni lūdzam Element!",
|
||||
"Sign In": "Pieteikties",
|
||||
@@ -7,26 +7,25 @@
|
||||
"Explore rooms": "Pārlūkot istabas",
|
||||
"Unexpected error preparing the app. See console for details.": "Lietotnes sagatavošanā gadījās negaidīta kļūda. Izvērsums ir atrodams konsolē.",
|
||||
"Invalid configuration: no default server specified.": "Nederīga konfigurācija: nav norādīts noklusējuma serveris.",
|
||||
"The message from the parser is: %(message)s": "Ziņa no parsētāja ir: %(message)s",
|
||||
"The message from the parser is: %(message)s": "Ziņa no pārsētāja ir: %(message)s",
|
||||
"Invalid JSON": "Nederīgs JSON",
|
||||
"Unable to load config file: please refresh the page to try again.": "Neizdevās ielādēt konfigurācijas datni. Lūgums pārlādēt lapu, lai mēģinātu vēlreiz.",
|
||||
"Go to your browser to complete Sign In": "Jādodas uz pārlūku, lai pabeigtu pieteikšanos",
|
||||
"Unsupported browser": "Neatbalstīts pārlūks",
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Lūgums uzstādīt <chromeLink>Chromium</chromeLink>, <firefoxLink>Firefox</firefoxLink> vai <safariLink>Safari</safariLink>, lai gūtu labāko lietošanas pieredzi.",
|
||||
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Var turpināt izmantot savu pašreizējo pārlūku, bet dažas iespējas nedarbosies, un lietotnes izskats un saskarne var būt nepilnīga.",
|
||||
"I understand the risks and wish to continue": "Es apzinos iespējamās sekas un vēlos turpināt",
|
||||
"I understand the risks and wish to continue": "Es apzinos riskus un vēlos turpināt",
|
||||
"Go to element.io": "Doties uz element.io",
|
||||
"Failed to start": "Neizdevās palaist",
|
||||
"Powered by Matrix": "Darbina Matrix",
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s izmanto pārlūku iespējas, kuras nav pieejamas šajā pārlūkā.",
|
||||
"Your browser can't run %(brand)s": "Šajā pārlūkā nevar palaist %(brand)s",
|
||||
"Open": "Atvērt",
|
||||
"Download Completed": "Lejupielāde ir pabeigta",
|
||||
"Download Completed": "Lejuplāde ir pabeigta",
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Element konfigurācija satur nederīgu JSON. Lūgums novērst kļūmi un pārlādēt lapu.",
|
||||
"Your Element is misconfigured": "Element ir kļūdaini iestatīts",
|
||||
"Use %(brand)s on mobile": "Viedtālrunī jāizmanto %(brand)s",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Decentralizēta, šifrēta saziņa un sadarbība, ko nodrošina $matrixLogo",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s darbvirsma: %(platformName)s",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s %(osName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Nederīga konfigurācija: default_hs_url nevar būt norādīts vienlaicīgi ar default_server_name vai default_server_config"
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s %(osName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Use %(brand)s on mobile": "Użyj %(brand)s w telefonie",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Zdecentralizowany, szyfrowany czat i współpraca oparte na $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s na %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "Komputer %(brand)s: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Nieprawidłowa konfiguracja: nie można określić default_hs_url wraz z default_server_name lub default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "Komputer %(brand)s: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Use %(brand)s on mobile": "Používať %(brand)s na mobilnom zariadení",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Decentralizované, šifrované konverzácie a spolupráca na platforme $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s na %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Stolný počítač: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Neplatná konfigurácia: default_hs_url nemôže byť určená spolu s default_server_name alebo default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Stolný počítač: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -21,12 +21,11 @@
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s uporablja napredne lastnosti brskalnika, ki jih vaš trenutni brskalnik ne podpira.",
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Za najboljšo izkušnjo, prosim namestite <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink> ali <safariLink>Safari</safariLink>.",
|
||||
"You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Lahko nadaljujete z uporabo vašega trenutnega brskalnika, vendar lahko to privede do manjkajočih funkcionalnosti ali napačnega izgleda aplikacije.",
|
||||
"I understand the risks and wish to continue": "Razumem tveganje in želim vseeno nadaljevati",
|
||||
"I understand the risks and wish to continue": "Razumem riziko in želim vseeno nadaljevati",
|
||||
"Go to element.io": "Pojdi na element.io",
|
||||
"Failed to start": "Neuspel zagon",
|
||||
"Use %(brand)s on mobile": "Uporabi %(brand)s na mobilni napravi",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Decentraliziran, šifriran pogovor in sodelovanje, omogočen z $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s na %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Namizni računalnik: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Nepravilna konfiguracija: če določite default_server_name ali default_server_config default_hs_url ne more biti določen"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Namizni računalnik: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Use %(brand)s on mobile": "Përdor %(brand)s në celular",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Fjalosje & bashkëpunim i decentralizuar, i fshehtëzuar, bazuar në $matrixLogo",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s për Desktop: %(platformName)s",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s në %(osName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Formësim i pavlefshëm: një default_hs_url s’mund të jepet tok me default_server_name, apo default_server_config"
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s në %(osName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Use %(brand)s on mobile": "Använd %(brand)s på mobilen",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Decentraliserad krypterad chatt & samarbete som drivs av $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s på %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Skrivbord: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Ogiltig konfiguration: en default_hs_url kan inte anges tillsammans med default_server_name eller default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s Skrivbord: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -27,6 +27,5 @@
|
||||
"Your Element is misconfigured": "Element đang bị thiết lập sai",
|
||||
"Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Dịch vụ nhắn tin & liên lạc được mã hóa, phi tập trung. Được vận hành trên $matrixLogo",
|
||||
"%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s trên %(osName)s",
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s máy tính: %(platformName)s",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config": "Cấu hình không hợp lệ: không thể xác định default_hs_url song song với default_server_name hay default_server_config"
|
||||
"%(brand)s Desktop: %(platformName)s": "%(brand)s máy tính: %(platformName)s"
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import {
|
||||
IVariables,
|
||||
TranslatedString,
|
||||
TranslationKey as ReactTranslationKey,
|
||||
// eslint-disable-next-line camelcase
|
||||
_t as react_t,
|
||||
// eslint-disable-next-line camelcase
|
||||
_td as react_td,
|
||||
// eslint-disable-next-line camelcase
|
||||
_tDom as react_tDom,
|
||||
Tags,
|
||||
UserFriendlyError as ReactUserFriendlyError,
|
||||
ErrorOptions,
|
||||
} from "matrix-react-sdk/src/languageHandler";
|
||||
import { Leaves } from "matrix-react-sdk/src/@types/common";
|
||||
|
||||
import type ReactEN from "matrix-react-sdk/src/i18n/strings/en_EN.json";
|
||||
import type EN from "./i18n/strings/en_EN.json";
|
||||
|
||||
/**
|
||||
* This module wraps languageHandler in the matrix-react-sdk and adds type casts to include translations
|
||||
* which we know will be injected by webpack.
|
||||
*/
|
||||
|
||||
export type TranslationKey = Leaves<typeof EN & typeof ReactEN, "|", string | { other: string }>;
|
||||
|
||||
export class UserFriendlyError extends ReactUserFriendlyError {
|
||||
public constructor(message: TranslationKey, substitutionVariablesAndCause?: IVariables & ErrorOptions) {
|
||||
super(message as ReactTranslationKey, substitutionVariablesAndCause);
|
||||
}
|
||||
}
|
||||
|
||||
export function _td(s: TranslationKey): TranslationKey {
|
||||
return react_td(s as ReactTranslationKey);
|
||||
}
|
||||
|
||||
// eslint-next-line @typescript-eslint/naming-convention
|
||||
export function _t(text: TranslationKey, variables?: IVariables): string;
|
||||
export function _t(text: TranslationKey, variables: IVariables | undefined, tags: Tags): React.ReactNode;
|
||||
export function _t(text: TranslationKey, variables?: IVariables, tags?: Tags): TranslatedString {
|
||||
return react_t(text as ReactTranslationKey, variables, tags!);
|
||||
}
|
||||
|
||||
// eslint-next-line @typescript-eslint/naming-convention
|
||||
export function _tDom(text: TranslationKey, variables?: IVariables): TranslatedString;
|
||||
export function _tDom(text: TranslationKey, variables: IVariables, tags: Tags): React.ReactNode;
|
||||
export function _tDom(text: TranslationKey, variables?: IVariables, tags?: Tags): TranslatedString {
|
||||
return react_tDom(text as ReactTranslationKey, variables!, tags!);
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import "matrix-js-sdk/src/browser-index";
|
||||
|
||||
import React, { ReactElement } from "react";
|
||||
import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
|
||||
import { UserFriendlyError } from "matrix-react-sdk/src/languageHandler";
|
||||
import AutoDiscoveryUtils from "matrix-react-sdk/src/utils/AutoDiscoveryUtils";
|
||||
import { AutoDiscovery, ClientConfig } from "matrix-js-sdk/src/autodiscovery";
|
||||
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
|
||||
@@ -33,13 +34,11 @@ import { createClient } from "matrix-js-sdk/src/matrix";
|
||||
import { SnakedObject } from "matrix-react-sdk/src/utils/SnakedObject";
|
||||
import MatrixChat from "matrix-react-sdk/src/components/structures/MatrixChat";
|
||||
import { ValidatedServerConfig } from "matrix-react-sdk/src/utils/ValidatedServerConfig";
|
||||
import { WrapperLifecycle, WrapperOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/WrapperLifecycle";
|
||||
import { ModuleRunner } from "matrix-react-sdk/src/modules/ModuleRunner";
|
||||
import { QueryDict, encodeParams } from "matrix-js-sdk/src/utils";
|
||||
|
||||
import { parseQs } from "./url_utils";
|
||||
import VectorBasePlatform from "./platform/VectorBasePlatform";
|
||||
import { getInitialScreenAfterLogin, getScreenFromLocation, init as initRouting, onNewScreen } from "./routing";
|
||||
import { UserFriendlyError } from "../languageHandler";
|
||||
|
||||
// add React and ReactPerf to the global namespace, to make them easier to access via the console
|
||||
// this incidentally means we can forget our React imports in JSX files without penalty.
|
||||
@@ -49,6 +48,31 @@ logger.log(`Application is running in ${process.env.NODE_ENV} mode`);
|
||||
|
||||
window.matrixLogger = logger;
|
||||
|
||||
// We use this to work out what URL the SDK should
|
||||
// pass through when registering to allow the user to
|
||||
// click back to the client having registered.
|
||||
// It's up to us to recognise if we're loaded with
|
||||
// this URL and tell MatrixClient to resume registration.
|
||||
//
|
||||
// If we're in electron, we should never pass through a file:// URL otherwise
|
||||
// the identity server will try to 302 the browser to it, which breaks horribly.
|
||||
// so in that instance, hardcode to use app.element.io for now instead.
|
||||
function makeRegistrationUrl(params: QueryDict): string {
|
||||
let url: string;
|
||||
if (window.location.protocol === "vector:") {
|
||||
url = "https://app.element.io/#/register";
|
||||
} else {
|
||||
url = window.location.protocol + "//" + window.location.host + window.location.pathname + "#/register";
|
||||
}
|
||||
|
||||
const encodedParams = encodeParams(params);
|
||||
if (encodedParams) {
|
||||
url += "?" + encodedParams;
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
function onTokenLoginCompleted(): void {
|
||||
// if we did a token login, we're now left with the token, hs and is
|
||||
// url as query params in the url;
|
||||
@@ -111,22 +135,18 @@ export async function loadApp(fragParams: {}): Promise<ReactElement> {
|
||||
|
||||
const initialScreenAfterLogin = getInitialScreenAfterLogin(window.location);
|
||||
|
||||
const wrapperOpts: WrapperOpts = { Wrapper: React.Fragment };
|
||||
ModuleRunner.instance.invoke(WrapperLifecycle.Wrapper, wrapperOpts);
|
||||
|
||||
return (
|
||||
<wrapperOpts.Wrapper>
|
||||
<MatrixChat
|
||||
onNewScreen={onNewScreen}
|
||||
config={config}
|
||||
realQueryParams={params}
|
||||
startingFragmentQueryParams={fragParams}
|
||||
enableGuest={!config.disable_guests}
|
||||
onTokenLoginCompleted={onTokenLoginCompleted}
|
||||
initialScreenAfterLogin={initialScreenAfterLogin}
|
||||
defaultDeviceDisplayName={defaultDeviceName}
|
||||
/>
|
||||
</wrapperOpts.Wrapper>
|
||||
<MatrixChat
|
||||
onNewScreen={onNewScreen}
|
||||
makeRegistrationUrl={makeRegistrationUrl}
|
||||
config={config}
|
||||
realQueryParams={params}
|
||||
startingFragmentQueryParams={fragParams}
|
||||
enableGuest={!config.disable_guests}
|
||||
onTokenLoginCompleted={onTokenLoginCompleted}
|
||||
initialScreenAfterLogin={initialScreenAfterLogin}
|
||||
defaultDeviceDisplayName={defaultDeviceName}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -154,7 +174,8 @@ async function verifyServerConfig(): Promise<IConfigOptions> {
|
||||
if (hsUrl && (wkConfig || serverName)) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw new UserFriendlyError(
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config",
|
||||
"Invalid configuration: a default_hs_url can't be specified along with default_server_name " +
|
||||
"or default_server_config",
|
||||
);
|
||||
}
|
||||
if (incompatibleOptions.length < 1) {
|
||||
|
||||
@@ -61,16 +61,7 @@
|
||||
<body style="height: 100%; margin: 0;">
|
||||
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
|
||||
<section id="matrixchat" style="height: 100%;" class="notranslate"></section>
|
||||
|
||||
<%
|
||||
// insert <script> tags for the JS entry points
|
||||
for (let file of htmlWebpackPlugin.files.js) {
|
||||
if (file.includes("bundle.js") || file.includes("unhomoglyph_data")) {
|
||||
%> <script src="<%= file %>"></script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<script src="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("bundle.js")) %>"></script>
|
||||
|
||||
<!-- Legacy supporting Prefetch images -->
|
||||
<img src="<%= require('matrix-react-sdk/res/img/warning.svg').default %>" aria-hidden alt="" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
|
||||
|
||||
@@ -199,7 +199,8 @@ async function start(): Promise<void> {
|
||||
// This uses the default brand since the app config is unavailable.
|
||||
return showError(_t("Your Element is misconfigured"), [
|
||||
_t(
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.",
|
||||
"Your Element configuration contains invalid JSON. " +
|
||||
"Please correct the problem and reload the page.",
|
||||
),
|
||||
_t("The message from the parser is: %(message)s", {
|
||||
message: error.message || _t("Invalid JSON"),
|
||||
|
||||
@@ -184,4 +184,4 @@ export async function loadModules(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
export { _t } from "../languageHandler";
|
||||
export const _t = languageHandler._t;
|
||||
|
||||
@@ -21,6 +21,7 @@ limitations under the License.
|
||||
import { UpdateCheckStatus, UpdateStatus } from "matrix-react-sdk/src/BasePlatform";
|
||||
import BaseEventIndexManager from "matrix-react-sdk/src/indexing/BaseEventIndexManager";
|
||||
import dis from "matrix-react-sdk/src/dispatcher/dispatcher";
|
||||
import { _t } from "matrix-react-sdk/src/languageHandler";
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
import { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions";
|
||||
import * as rageshake from "matrix-react-sdk/src/rageshake/rageshake";
|
||||
@@ -47,7 +48,6 @@ import DesktopCapturerSourcePicker from "matrix-react-sdk/src/components/views/e
|
||||
import VectorBasePlatform from "./VectorBasePlatform";
|
||||
import { SeshatIndexManager } from "./SeshatIndexManager";
|
||||
import { IPCManager } from "./IPCManager";
|
||||
import { _t } from "../../languageHandler";
|
||||
|
||||
interface SquirrelUpdate {
|
||||
releaseNotes: string;
|
||||
|
||||
@@ -18,11 +18,11 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import BasePlatform from "matrix-react-sdk/src/BasePlatform";
|
||||
import { _t } from "matrix-react-sdk/src/languageHandler";
|
||||
|
||||
import type { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions";
|
||||
import { getVectorConfig } from "../getconfig";
|
||||
import Favicon from "../../favicon";
|
||||
import { _t } from "../../languageHandler";
|
||||
|
||||
/**
|
||||
* Vector-specific extensions to the BasePlatform template
|
||||
|
||||
@@ -18,6 +18,7 @@ limitations under the License.
|
||||
|
||||
import { UpdateCheckStatus, UpdateStatus } from "matrix-react-sdk/src/BasePlatform";
|
||||
import dis from "matrix-react-sdk/src/dispatcher/dispatcher";
|
||||
import { _t } from "matrix-react-sdk/src/languageHandler";
|
||||
import { hideToast as hideUpdateToast, showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
|
||||
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
|
||||
import { CheckUpdatesPayload } from "matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload";
|
||||
@@ -26,7 +27,6 @@ import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import VectorBasePlatform from "./VectorBasePlatform";
|
||||
import { parseQs } from "../url_utils";
|
||||
import { _t } from "../../languageHandler";
|
||||
|
||||
const POKE_RATE_MS = 10 * 60 * 1000; // 10 min
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads";
|
||||
import "../jest-mocks";
|
||||
import WebPlatform from "../../src/vector/platform/WebPlatform";
|
||||
import { parseQs, parseQsFromFragment } from "../../src/vector/url_utils";
|
||||
import { cleanLocalstorage, deleteIndexedDB, waitForLoadingSpinner, waitForWelcomeComponent } from "../test-utils";
|
||||
import { cleanLocalstorage, deleteIndexedDB } from "../test-utils";
|
||||
|
||||
const DEFAULT_HS_URL = "http://my_server";
|
||||
const DEFAULT_IS_URL = "http://my_is";
|
||||
@@ -143,6 +143,9 @@ describe("loading:", function () {
|
||||
enableGuest={true}
|
||||
onTokenLoginCompleted={resolve}
|
||||
initialScreenAfterLogin={getScreenFromLocation(windowLocation!)}
|
||||
makeRegistrationUrl={(): string => {
|
||||
throw new Error("Not implemented");
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
});
|
||||
@@ -155,8 +158,10 @@ describe("loading:", function () {
|
||||
async function expectAndAwaitSync(opts?: { isGuest?: boolean }): Promise<any> {
|
||||
let syncRequest: (typeof MockHttpBackend.prototype.requests)[number] | null = null;
|
||||
httpBackend.when("GET", "/_matrix/client/versions").respond(200, {
|
||||
versions: ["v1.1"],
|
||||
unstable_features: {},
|
||||
versions: ["r0.3.0"],
|
||||
unstable_features: {
|
||||
"m.lazy_load_members": true,
|
||||
},
|
||||
});
|
||||
const isGuest = opts?.isGuest;
|
||||
if (!isGuest) {
|
||||
@@ -189,7 +194,7 @@ describe("loading:", function () {
|
||||
.then(async () => {
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
await waitForLoadingSpinner();
|
||||
await assertAtLoadingSpinner();
|
||||
|
||||
httpBackend
|
||||
.when("POST", "/register")
|
||||
@@ -202,7 +207,7 @@ describe("loading:", function () {
|
||||
})
|
||||
.then(() => {
|
||||
// Wait for another trip around the event loop for the UI to update
|
||||
return waitForWelcomeComponent(matrixChat);
|
||||
return awaitWelcomeComponent(matrixChat);
|
||||
})
|
||||
.then(() => {
|
||||
return waitFor(() => expect(windowLocation?.hash).toEqual("#/welcome"));
|
||||
@@ -215,14 +220,14 @@ describe("loading:", function () {
|
||||
});
|
||||
|
||||
// Pass the liveliness checks
|
||||
httpBackend.when("GET", "/versions").respond(200, { versions: ["v1.1"] });
|
||||
httpBackend.when("GET", "/versions").respond(200, { versions: ["r0.4.0"] });
|
||||
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
|
||||
|
||||
return sleep(1)
|
||||
.then(async () => {
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
await waitForLoadingSpinner();
|
||||
await assertAtLoadingSpinner();
|
||||
|
||||
httpBackend
|
||||
.when("POST", "/register")
|
||||
@@ -265,7 +270,7 @@ describe("loading:", function () {
|
||||
});
|
||||
|
||||
// Pass the liveliness checks
|
||||
httpBackend.when("GET", "/versions").respond(200, { versions: ["v1.1"] });
|
||||
httpBackend.when("GET", "/versions").respond(200, { versions: ["r0.4.0"] });
|
||||
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
|
||||
|
||||
return awaitLoginComponent(matrixChat)
|
||||
@@ -278,7 +283,7 @@ describe("loading:", function () {
|
||||
// the only outstanding request should be a GET /login
|
||||
// (in particular there should be no /register request for
|
||||
// guest registration).
|
||||
const allowedRequests = ["/_matrix/client/v3/login", "/versions", "/_matrix/identity/v2"];
|
||||
const allowedRequests = ["/_matrix/client/r0/login", "/versions", "/_matrix/identity/v2"];
|
||||
for (const req of httpBackend.requests) {
|
||||
if (req.method === "GET" && allowedRequests.find((p) => req.path.endsWith(p))) {
|
||||
continue;
|
||||
@@ -391,7 +396,7 @@ describe("loading:", function () {
|
||||
.then(async () => {
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
await waitForLoadingSpinner();
|
||||
await assertAtLoadingSpinner();
|
||||
|
||||
httpBackend
|
||||
.when("POST", "/register")
|
||||
@@ -427,7 +432,7 @@ describe("loading:", function () {
|
||||
.then(async () => {
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
await waitForLoadingSpinner();
|
||||
await assertAtLoadingSpinner();
|
||||
|
||||
httpBackend
|
||||
.when("POST", "/register")
|
||||
@@ -468,7 +473,7 @@ describe("loading:", function () {
|
||||
.then(async () => {
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
await waitForLoadingSpinner();
|
||||
await assertAtLoadingSpinner();
|
||||
|
||||
httpBackend
|
||||
.when("POST", "/register")
|
||||
@@ -562,7 +567,7 @@ describe("loading:", function () {
|
||||
return sleep(1)
|
||||
.then(async () => {
|
||||
// we expect a spinner while we're logging in
|
||||
await waitForLoadingSpinner();
|
||||
await assertAtLoadingSpinner();
|
||||
|
||||
httpBackend
|
||||
.when("POST", "/login")
|
||||
@@ -650,6 +655,11 @@ describe("loading:", function () {
|
||||
}
|
||||
});
|
||||
|
||||
// assert that we are on the loading page
|
||||
async function assertAtLoadingSpinner(): Promise<void> {
|
||||
await screen.findByRole("progressbar");
|
||||
}
|
||||
|
||||
async function awaitLoggedIn(matrixChat: RenderResult): Promise<void> {
|
||||
if (matrixChat.container.querySelector(".mx_MatrixChat_wrapper")) return; // already logged in
|
||||
|
||||
@@ -675,6 +685,10 @@ async function awaitLoginComponent(matrixChat?: RenderResult): Promise<void> {
|
||||
await waitFor(() => matrixChat?.container.querySelector(".mx_AuthPage"));
|
||||
}
|
||||
|
||||
async function awaitWelcomeComponent(matrixChat?: RenderResult): Promise<void> {
|
||||
await waitFor(() => matrixChat?.container.querySelector(".mx_Welcome"));
|
||||
}
|
||||
|
||||
function moveFromWelcomeToLogin(matrixChat?: RenderResult): Promise<void> {
|
||||
dis.dispatch({ action: "start_login" });
|
||||
return awaitLoginComponent(matrixChat);
|
||||
|
||||
@@ -29,7 +29,7 @@ describe("Loading server config", function () {
|
||||
PlatformPeg.set(new WebPlatform());
|
||||
fetchMock.get("https://matrix-client.matrix.org/_matrix/client/versions", {
|
||||
unstable_features: {},
|
||||
versions: ["v1.1"],
|
||||
versions: [],
|
||||
});
|
||||
fetchMock.get("https://matrix.org/.well-known/matrix/client", {
|
||||
"m.homeserver": {
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
Copyright 2023 Mikhail Aheichyk
|
||||
Copyright 2023 Nordeck IT + Consulting GmbH.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
import { render, RenderResult, screen } from "@testing-library/react";
|
||||
import { ModuleRunner } from "matrix-react-sdk/src/modules/ModuleRunner";
|
||||
import { WrapperLifecycle, WrapperOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/WrapperLifecycle";
|
||||
|
||||
import WebPlatform from "../../src/vector/platform/WebPlatform";
|
||||
import { loadApp } from "../../src/vector/app";
|
||||
import { waitForLoadingSpinner, waitForWelcomeComponent } from "../test-utils";
|
||||
|
||||
fetchMock.config.overwriteRoutes = true;
|
||||
|
||||
describe("Wrapper", () => {
|
||||
beforeEach(async () => {
|
||||
SdkConfig.reset();
|
||||
PlatformPeg.set(new WebPlatform());
|
||||
fetchMock.get("https://matrix-client.matrix.org/_matrix/client/versions", {
|
||||
unstable_features: {},
|
||||
versions: ["v1.1"],
|
||||
});
|
||||
fetchMock.get("https://matrix.org/.well-known/matrix/client", {
|
||||
"m.homeserver": {
|
||||
base_url: "https://matrix-client.matrix.org",
|
||||
},
|
||||
});
|
||||
fetchMock.get("/version", "1.10.13");
|
||||
});
|
||||
|
||||
it("wrap a matrix chat with header and footer", async () => {
|
||||
SdkConfig.put({
|
||||
default_server_config: {
|
||||
"m.homeserver": {
|
||||
base_url: "https://matrix-client.matrix.org",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
jest.spyOn(ModuleRunner.instance, "invoke").mockImplementation((lifecycleEvent, opts) => {
|
||||
if (lifecycleEvent === WrapperLifecycle.Wrapper) {
|
||||
(opts as WrapperOpts).Wrapper = ({ children }) => {
|
||||
return (
|
||||
<>
|
||||
<div data-testid="wrapper-header">Header</div>
|
||||
<div data-testid="wrapper-matrix-chat">{children}</div>
|
||||
<div data-testid="wrapper-footer">Footer</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const matrixChatResult: RenderResult = render(await loadApp({}));
|
||||
|
||||
// at this point, we're trying to do a guest registration;
|
||||
// we expect a spinner
|
||||
await waitForLoadingSpinner();
|
||||
|
||||
await waitForWelcomeComponent(matrixChatResult);
|
||||
|
||||
// Are not semantic elements because Element has a footer already.
|
||||
const header = screen.getByTestId("wrapper-header");
|
||||
const matrixChat = screen.getByTestId("wrapper-matrix-chat");
|
||||
const footer = screen.getByTestId("wrapper-footer");
|
||||
|
||||
expect(header.nextSibling).toBe(matrixChat);
|
||||
expect(matrixChat.nextSibling).toBe(footer);
|
||||
});
|
||||
});
|
||||
@@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { RenderResult, screen, waitFor } from "@testing-library/react";
|
||||
|
||||
export function cleanLocalstorage(): void {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
@@ -49,12 +47,3 @@ export function deleteIndexedDB(dbName: string): Promise<void> {
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
|
||||
// wait for loading page
|
||||
export async function waitForLoadingSpinner(): Promise<void> {
|
||||
await screen.findByRole("progressbar");
|
||||
}
|
||||
|
||||
export async function waitForWelcomeComponent(matrixChat?: RenderResult): Promise<void> {
|
||||
await waitFor(() => matrixChat?.container.querySelector(".mx_Welcome"));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ describe("PWAPlatform", () => {
|
||||
});
|
||||
|
||||
it("should fall back to WebPlatform::setNotificationCount if no Navigator::setAppBadge", () => {
|
||||
// @ts-ignore
|
||||
navigator.setAppBadge = undefined;
|
||||
const platform = new PWAPlatform();
|
||||
const superMethod = mocked(WebPlatform.prototype.setNotificationCount);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"useDefineForClassFields": true,
|
||||
"experimentalDecorators": false,
|
||||
"emitDecoratorMetadata": false,
|
||||
"resolveJsonModule": true,
|
||||
|
||||
@@ -171,17 +171,6 @@ module.exports = (env, argv) => {
|
||||
enforce: true,
|
||||
// Do not add `chunks: 'all'` here because you'll break the app entry point.
|
||||
},
|
||||
|
||||
// put the unhomoglyph data in its own file. It contains
|
||||
// magic characters which mess up line numbers in the
|
||||
// javascript debugger.
|
||||
unhomoglyph_data: {
|
||||
name: "unhomoglyph_data",
|
||||
test: /unhomoglyph\/data\.json$/,
|
||||
enforce: true,
|
||||
chunks: "all",
|
||||
},
|
||||
|
||||
default: {
|
||||
reuseExistingChunk: true,
|
||||
},
|
||||
@@ -227,11 +216,8 @@ module.exports = (env, argv) => {
|
||||
// Same goes for js/react-sdk - we don't need two copies.
|
||||
"matrix-js-sdk": path.resolve(__dirname, "node_modules/matrix-js-sdk"),
|
||||
"matrix-react-sdk": path.resolve(__dirname, "node_modules/matrix-react-sdk"),
|
||||
"@matrix-org/react-sdk-module-api": path.resolve(
|
||||
__dirname,
|
||||
"node_modules/@matrix-org/react-sdk-module-api",
|
||||
),
|
||||
// and matrix-events-sdk & matrix-widget-api
|
||||
// and sanitize-html & matrix-events-sdk & matrix-widget-api
|
||||
"sanitize-html": path.resolve(__dirname, "node_modules/sanitize-html"),
|
||||
"matrix-events-sdk": path.resolve(__dirname, "node_modules/matrix-events-sdk"),
|
||||
"matrix-widget-api": path.resolve(__dirname, "node_modules/matrix-widget-api"),
|
||||
|
||||
@@ -286,12 +272,6 @@ module.exports = (env, argv) => {
|
||||
if (f.startsWith(reactSdkSrcDir)) return true;
|
||||
if (f.startsWith(jsSdkSrcDir)) return true;
|
||||
|
||||
// Some of the syntax in this package is not understood by
|
||||
// either webpack or our babel setup.
|
||||
// When we do get to upgrade our current setup, this should
|
||||
// probably be removed.
|
||||
if (f.includes(path.join("@vector-im", "compound-web"))) return true;
|
||||
|
||||
// but we can't run all of our dependencies through babel (many of them still
|
||||
// use module.exports which breaks if babel injects an 'include' for its
|
||||
// polyfills: probably fixable but babeling all our dependencies is probably
|
||||
@@ -535,12 +515,6 @@ module.exports = (env, argv) => {
|
||||
removeDimensions: true,
|
||||
},
|
||||
},
|
||||
/**
|
||||
* Forwards the React ref to the root SVG element
|
||||
* Useful when using things like `asChild` in
|
||||
* radix-ui
|
||||
*/
|
||||
ref: true,
|
||||
esModule: false,
|
||||
name: "[name].[hash:7].[ext]",
|
||||
outputPath: getAssetOutputPath,
|
||||
@@ -746,36 +720,14 @@ module.exports = (env, argv) => {
|
||||
* @return {string} The returned paths will look like `img/warning.1234567.svg`.
|
||||
*/
|
||||
function getAssetOutputPath(url, resourcePath) {
|
||||
const isKaTeX = resourcePath.includes("KaTeX");
|
||||
// `res` is the parent dir for our own assets in various layers
|
||||
// `dist` is the parent dir for KaTeX assets
|
||||
const prefix = /^.*[/\\](dist|res)[/\\]/;
|
||||
|
||||
/**
|
||||
* Only needed for https://github.com/vector-im/element-web/pull/15939
|
||||
* If keeping this, we are not able to load external assets such as SVG
|
||||
* images coming from @vector-im/compound-web.
|
||||
*/
|
||||
if (isKaTeX && !resourcePath.match(prefix)) {
|
||||
if (!resourcePath.match(prefix)) {
|
||||
throw new Error(`Unexpected asset path: ${resourcePath}`);
|
||||
}
|
||||
let outputDir = path.dirname(resourcePath).replace(prefix, "");
|
||||
|
||||
/**
|
||||
* Imports from Compound are "absolute", we need to strip out the prefix
|
||||
* coming before the npm package name.
|
||||
*
|
||||
* This logic is scoped to compound packages for now as they are the only
|
||||
* package that imports external assets. This might need to be made more
|
||||
* generic in the future
|
||||
*/
|
||||
const compoundImportsPrefix = /@vector-im(?:\\|\/)compound-(.*?)(?:\\|\/)/;
|
||||
const compoundMatch = outputDir.match(compoundImportsPrefix);
|
||||
if (compoundMatch) {
|
||||
outputDir = outputDir.substring(compoundMatch.index + compoundMatch[0].length);
|
||||
}
|
||||
|
||||
if (isKaTeX) {
|
||||
if (resourcePath.includes("KaTeX")) {
|
||||
// Add a clearly named directory segment, rather than leaving the KaTeX
|
||||
// assets loose in each asset type directory.
|
||||
outputDir = path.join(outputDir, "KaTeX");
|
||||
|
||||
Reference in New Issue
Block a user