Compare commits

...

92 Commits

Author SHA1 Message Date
RiotRobot 5ee16a9db1 v1.11.40
Dockerhub / Docker Buildx (push) Failing after 47s
2023-08-29 11:12:08 +01:00
RiotRobot 61669e5cbf Prepare changelog for v1.11.40 2023-08-29 11:12:07 +01:00
RiotRobot 61fba2c32c Upgrade matrix-react-sdk to 3.79.0 2023-08-29 11:09:15 +01:00
RiotRobot e870fe2048 Upgrade matrix-js-sdk to 28.0.0 2023-08-29 11:08:30 +01:00
RiotRobot ba5f9767f3 v1.11.40-rc.1
Dockerhub / Docker Buildx (push) Failing after 40s
2023-08-23 12:02:01 +01:00
RiotRobot 60a8dc592a Prepare changelog for v1.11.40-rc.1 2023-08-23 12:02:00 +01:00
RiotRobot 50f7c1edfb Upgrade matrix-react-sdk to 3.79.0-rc.2 2023-08-23 11:59:58 +01:00
RiotRobot 9c06e33e78 Upgrade matrix-js-sdk to 28.0.0-rc.1 2023-08-23 11:55:44 +01:00
Element Translate Bot c13816dce4 Translated using Weblate (Georgian) (#26029)
Currently translated at 100.0% (30 of 30 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/ka/

Co-authored-by: Nicholas Winterhalter <gewinum@gmail.com>
Co-authored-by: Weblate <translate@riot.im>
2023-08-22 13:13:19 +00:00
Michael Telatynski 7f3d85c0c5 Remove Exploring public spaces from labs.md (#25991) 2023-08-21 10:39:16 +01:00
Dominik Henneke 65f7545ba5 Bump @matrix-org/react-sdk-module-api from 1.0.0 to 2.0.0 (#25986) 2023-08-18 12:03:28 +00:00
Germain c026879237 Fix path separator for Windows based systems (#25997) 2023-08-18 11:56:07 +01:00
Germain d9b4e531b0 Allow external assets loading (#25998) 2023-08-18 09:45:32 +01:00
Michael Telatynski 062e93a5d2 Tidy and improve dev scripts (#25978) 2023-08-18 08:34:56 +01:00
Michael Telatynski 96c652ef08 Switch to nested object pluralisation format for i18n files (#25970) 2023-08-17 09:37:59 +01:00
Michael Telatynski 017fbb3793 Remove redundant makeRegistrationUrl prop (#25953) 2023-08-15 16:18:55 +01:00
ElementRobot 6bce017823 Reset matrix-js-sdk back to develop branch 2023-08-15 13:38:45 +01:00
ElementRobot f9b7372883 Reset matrix-react-sdk back to develop branch 2023-08-15 13:38:23 +01:00
ElementRobot 6755448e86 Merge branch 'master' into develop
# Conflicts:
#	yarn.lock
2023-08-15 13:37:44 +01:00
ElementRobot 9a650bd12a v1.11.39
Dockerhub / Docker Buildx (push) Failing after 45s
2023-08-15 13:33:32 +01:00
ElementRobot 7dabb3ce9a Prepare changelog for v1.11.39 2023-08-15 13:33:31 +01:00
ElementRobot 8c33ebfd52 Upgrade matrix-js-sdk to 27.2.0 2023-08-15 13:29:15 +01:00
ElementRobot 70742e0432 Upgrade matrix-react-sdk to 3.78.0 2023-08-15 13:28:41 +01:00
renovate[bot] fb984abf12 Update all non-major dependencies (#25938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 09:16:12 +01:00
Michael Telatynski 7351c722be Fix tests for Matrix v1.1 requirement (#25898) 2023-08-14 09:07:43 +01:00
Michael Telatynski d1f7b0898a Update setupFilesAfterEnv to TS (#25928) 2023-08-09 09:39:45 +01:00
renovate[bot] a61ab7c033 Lock file maintenance (#25940)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 15:18:01 +00:00
renovate[bot] 424cbdd47b Update dependency eslint-config-prettier to v9 (#25939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 14:42:50 +00:00
renovate[bot] f58b122850 Update babel monorepo to v7.22.10 (#25937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 14:32:54 +00:00
ElementRobot f676406fb2 v1.11.39-rc.1
Dockerhub / Docker Buildx (push) Failing after 44s
2023-08-08 15:24:25 +01:00
ElementRobot f77d968da9 Prepare changelog for v1.11.39-rc.1 2023-08-08 15:24:24 +01:00
ElementRobot 3cce4de454 Upgrade matrix-js-sdk to 27.2.0-rc.1 2023-08-08 15:21:49 +01:00
ElementRobot 84fe974606 Upgrade matrix-react-sdk to 3.78.0-rc.1 2023-08-08 15:20:55 +01:00
renovate[bot] e3bc5f45f5 Update tibdex/backport digest to 9565281 (#25936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 14:17:41 +00:00
Element Translate Bot b1129e4d28 Translations update from Weblate (#25935)
Co-authored-by: Jan Schönfeld <jan.schoenfeld@tutanota.de>
Co-authored-by: Vri <element@vrifox.cc>
Co-authored-by: Weblate <translate@riot.im>
2023-08-08 14:48:24 +01:00
Charly Nguyen 15836ac5df Update labs.md for knock rooms (#25923) 2023-08-04 15:56:13 +01:00
Michael Telatynski 1093b41d70 Update build_debian.yaml 2023-08-04 09:46:10 +01:00
RiotRobot 030b1fb339 Reset matrix-react-sdk back to develop branch 2023-08-04 09:41:37 +01:00
RiotRobot 7a3e36d434 Reset matrix-js-sdk back to develop branch 2023-08-04 09:41:15 +01:00
RiotRobot 595ddc316e Merge branch 'master' into develop 2023-08-04 09:39:44 +01:00
RiotRobot e059524f6e v1.11.38
Dockerhub / Docker Buildx (push) Failing after 46s
2023-08-04 09:33:32 +01:00
RiotRobot ab7536d220 Prepare changelog for v1.11.38 2023-08-04 09:33:31 +01:00
RiotRobot 0b72e925d5 Upgrade matrix-react-sdk to 3.77.1 2023-08-04 09:31:06 +01:00
ElementRobot bb223eedd5 [Backport staging] Package release builds of element-web in package.element.io debs (#25921)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-04 09:23:11 +01:00
Germain 8fc0763391 Remove feature_right_panel_default_open (#25915) 2023-08-03 09:34:00 +00:00
Michael Telatynski e395178b2b Package release builds of element-web in package.element.io debs (#25198) 2023-08-02 14:40:40 +01:00
Germain c6756ea52a Transpile @vector-im/compound-web with babel (#25906) 2023-08-02 10:07:40 +00:00
ElementRobot 4f790eb134 Reset matrix-js-sdk back to develop branch 2023-08-01 12:53:01 +01:00
ElementRobot 50ca01f8d0 Reset matrix-react-sdk back to develop branch 2023-08-01 12:52:44 +01:00
ElementRobot 3b37081818 Merge branch 'master' into develop
# Conflicts:
#	yarn.lock
2023-08-01 12:51:00 +01:00
ElementRobot a0e0df32af v1.11.37
Dockerhub / Docker Buildx (push) Failing after 56s
2023-08-01 12:46:38 +01:00
ElementRobot fc94e9b6d4 Prepare changelog for v1.11.37 2023-08-01 12:46:38 +01:00
ElementRobot 69c43bb142 Upgrade matrix-js-sdk to 27.1.0 2023-08-01 12:45:16 +01:00
ElementRobot 2abff92b7b Upgrade matrix-react-sdk to 3.77.0 2023-08-01 12:44:18 +01:00
Germain a0558a8287 Document 'feature_new_room_decoration_ui' (#25890) 2023-08-01 08:32:59 +01:00
renovate[bot] b404d2d014 Lock file maintenance (#25886)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-31 12:05:54 +00:00
renovate[bot] 5644c4e175 Lock file maintenance (#25860)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 12:23:15 +01:00
renovate[bot] 790ff16701 Update all non-major dependencies (#25858)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-27 11:33:18 +01:00
renovate[bot] a19c3f5da6 Update dependency @types/node to v16.18.39 (#25857)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 09:22:47 +00:00
renovate[bot] 58e40c597d Update dependency eslint-plugin-unicorn to v48 (#25859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 10:19:44 +01:00
ElementRobot 7018f78510 v1.11.37-rc.1
Dockerhub / Docker Buildx (push) Failing after 43s
2023-07-27 09:49:13 +01:00
ElementRobot 4eae1d4bcf Prepare changelog for v1.11.37-rc.1 2023-07-27 09:49:13 +01:00
ElementRobot a618f95369 Upgrade matrix-js-sdk to 27.1.0-rc.1 2023-07-27 09:47:40 +01:00
ElementRobot fef081c77b Upgrade matrix-react-sdk to 3.77.0-rc.1 2023-07-27 09:47:24 +01:00
Element Translate Bot 6406ae1a88 Translations update from Weblate (#25856)
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: random <dictionary@tutamail.com>
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
Co-authored-by: Weblate <translate@riot.im>
Co-authored-by: James Choi <tienipia@gmail.com>
Co-authored-by: Srebrni <kiborg@novko.si>
Co-authored-by: waclaw66 <waclaw66@seznam.cz>
Co-authored-by: Someone <hahahahacker2009@gmail.com>
Co-authored-by: LinAGKar <linus.kardell@gmail.com>
Co-authored-by: raspin0 <marcinekk13@interia.pl>
Co-authored-by: Edgars Andersons <Edgars+Element-translations@gaitenis.id.lv>
2023-07-27 08:57:15 +01:00
Michael Telatynski cc8afed196 Avoid using deprecated config.json key casing (#25833)
* Avoid using deprecated config.json key casing

* Fix configs s'more
2023-07-24 07:51:51 +00:00
RiotRobot 2753bc9f8e Reset matrix-react-sdk back to develop branch 2023-07-18 15:22:06 +01:00
RiotRobot 1c420b436d Reset matrix-js-sdk back to develop branch 2023-07-18 15:21:32 +01:00
RiotRobot 19d663d052 Merge branch 'master' into develop 2023-07-18 15:19:24 +01:00
Germain c1bbaf6c02 Removing stale labs flag (#25823) 2023-07-18 09:37:09 +01:00
renovate[bot] 4cf4dc9a3d Lock file maintenance (#25145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 18:11:39 +00:00
renovate[bot] 44dde72950 Update docker/setup-buildx-action digest to 4c0219f (#25757)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 19:01:38 +01:00
Michael Telatynski 048d8c417d Remove redundant dependencies (#25814) 2023-07-17 13:15:03 +01:00
Ben Banfield-Zanin 42afb0199f Correct Jitsi preferred_domain property (#25813) 2023-07-17 10:20:40 +00:00
Kerry e68583a6e2 Test: don't unmount MatrixChat before setup is finished (#25783) 2023-07-17 08:50:13 +12:00
renovate[bot] 48044f3847 Update all non-major dependencies (#25759)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-16 15:44:56 +00:00
Šimon Brandner 93e6ee11ab Switch to the new session API for screen-sharing (#25802) 2023-07-14 22:05:23 +02:00
Michael Telatynski a84349f969 Deprecate camelCase config options (#25800) 2023-07-14 11:16:41 +01:00
Michael Telatynski b89b000f05 Update update-topics.yaml 2023-07-13 12:31:39 +01:00
Michael Telatynski 0e97a178e3 Fix regex not handling rc versions 2023-07-13 12:30:27 +01:00
Michael Telatynski 767c30f2ee Update update-topics.yaml 2023-07-13 12:26:02 +01:00
Michael Telatynski fe3d7f3fa9 Update update-topics.yaml 2023-07-13 12:23:30 +01:00
Michael Telatynski 9856863b03 Update update-topics.yaml 2023-07-13 12:21:41 +01:00
renovate[bot] 231d3387e6 Update typescript-eslint monorepo to v5.61.0 (#25761)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 09:21:37 +00:00
renovate[bot] d67db02eea Update dependency stylelint-config-standard to v34 (#25765)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:18:30 +01:00
renovate[bot] 6508aca804 Update jest (#25760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 09:09:04 +00:00
renovate[bot] 30aff46e40 Update dependency @types/node to v16.18.38 (#25758)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 08:53:29 +00:00
renovate[bot] da0b6580e5 Update babel monorepo (#25505)
* Update babel monorepo

* Add missing @babel/plugin-proposal-logical-assignment-operators dependency

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-12 14:59:32 +00:00
Michael Telatynski 453a361017 Remove rageshake server from config.sample.json (#25772) 2023-07-12 13:11:49 +01:00
Michael Telatynski 5a701c418f Update logging ignore list comment (#25769) 2023-07-11 23:39:16 +01:00
Michael Telatynski abc559388e Update update-topics.yaml 2023-07-11 16:29:28 +01:00
renovate[bot] 3b3f12fb97 Update dependency @matrix-org/react-sdk-module-api to v1 (#25754)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-11 14:17:22 +00:00
43 changed files with 2400 additions and 1998 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
)
)
steps:
- uses: tibdex/backport@2e217641d82d02ba0603f46b1aeedefb258890ac # v2
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # 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
View File
@@ -0,0 +1,56 @@
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
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2
with:
install: true
+15 -8
View File
@@ -21,9 +21,6 @@ jobs:
runs-on: ubuntu-latest
environment: Matrix
steps:
- id: stable
uses: fangqiuming/latest-release-version@45b2da0e20968cd18c356c548d3c5ccb7318bb8f
- uses: actions/github-script@v6
env:
HS_URL: ${{ secrets.BETABOT_HS_URL }}
@@ -31,12 +28,22 @@ jobs:
PUBLIC_ROOM_ID: "!YTvKGNlinIzlkMTVRl:matrix.org"
ANNOUNCEMENT_ROOM_ID: "!bijaLdadorKgNGtHdA:matrix.org"
TOKEN: ${{ secrets.BETABOT_ACCESS_TOKEN }}
RELEASE_TOPIC: "Stable: ${{ steps.stable.outputs.tag_name }} | Release status: ${{ inputs.expected_status }} expected ${{ inputs.expected_date }}"
RELEASE_STATUS: "Release status: ${{ inputs.expected_status }} expected ${{ inputs.expected_date }}"
with:
script: |
const { HS_URL, TOKEN, RELEASE_TOPIC, LOBBY_ROOM_ID, PUBLIC_ROOM_ID, ANNOUNCEMENT_ROOM_ID } = process.env;
const { HS_URL, TOKEN, RELEASE_STATUS, LOBBY_ROOM_ID, PUBLIC_ROOM_ID, ANNOUNCEMENT_ROOM_ID } = process.env;
const regex = /Stable: v(\d+.\d+.\d+) \| Release status: (\w+) expected (\w+ \d+\w+)/gm;
const repo = context.repo;
const { data } = await github.rest.repos.getLatestRelease({
owner: repo.owner,
repo: repo.repo,
});
console.log("Found latest version: " + data.tag_name);
const releaseTopic = `Stable: ${data.tag_name} | ${RELEASE_STATUS}`;
console.log("Release topic: " + releaseTopic);
const regex = /Stable: v(.+) \| Release status: (\w+) expected (\w+ \d+\w\w)/gm;
async function updateReleaseInTopic(roomId) {
const apiUrl = `${HS_URL}/_matrix/client/v3/rooms/${roomId}/state/m.room.topic/`;
@@ -56,14 +63,14 @@ jobs:
});
const data = await res.json();
const topic = data.topic.replace(regex, RELEASE_TOPIC);
const topic = data.topic.replace(regex, releaseTopic);
if (topic === data.topic) {
console.log(roomId, "nothing to do");
return;
}
if (data["org.matrix.msc3765.topic"]) {
data["org.matrix.msc3765.topic"].forEach(d => {
d.body = d.body.replace(regex, RELEASE_TOPIC);
d.body = d.body.replace(regex, releaseTopic);
});
}
+123
View File
@@ -1,3 +1,126 @@
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)
=================================================================================================
-2
View File
@@ -22,8 +22,6 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"default_country_code": "GB",
"show_labs_settings": false,
"features": {},
+1
View File
@@ -0,0 +1 @@
/usr/share/element-web/config.json
Vendored Executable
+12
View File
@@ -0,0 +1,12 @@
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
+8
View File
@@ -1,5 +1,13 @@
# Configuration
### 🦖 Deprecation notice
Configuration keys were previously a mix of camelCase and snake_case.
We standardised to snake_case but added compatibility for camelCase to all settings.
This backwards compatibility will be getting removed in a future release so please ensure you are using snake_case.
---
You can configure the app by copying `config.sample.json` to `config.json` or `config.$domain.json` and customising it.
Element will attempt to load first `config.$domain.json` and if it fails `config.json`. This mechanism allows different
configuration options depending on if you're hitting e.g. `app1.example.com` or `app2.example.com`. Configs are not mixed
+1 -1
View File
@@ -30,7 +30,7 @@ to your [config](./config.md) the following:
```json
{
"jitsi": {
"preferredDomain": "your.jitsi.example.org"
"preferred_domain": "your.jitsi.example.org"
}
}
```
+8 -43
View File
@@ -86,11 +86,6 @@ 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
@@ -105,35 +100,6 @@ 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.
@@ -158,17 +124,16 @@ 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.
+4 -4
View File
@@ -20,8 +20,8 @@
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"showLabsSettings": false,
"roomDirectory": {
"show_labs_settings": false,
"room_directory": {
"servers": ["matrix.org", "gitter.im", "libera.chat"]
},
"enable_presence_by_hs_url": {
@@ -39,8 +39,8 @@
}
],
"posthog": {
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"apiHost": "https://posthog.element.io"
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"api_host": "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"
+4 -5
View File
@@ -20,8 +20,8 @@
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"showLabsSettings": true,
"roomDirectory": {
"show_labs_settings": true,
"room_directory": {
"servers": ["matrix.org", "gitter.im", "libera.chat"]
},
"enable_presence_by_hs_url": {
@@ -43,12 +43,11 @@
"environment": "develop"
},
"posthog": {
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"apiHost": "https://posthog.element.io"
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"api_host": "https://posthog.element.io"
},
"privacy_policy_url": "https://element.io/cookie-policy",
"features": {
"feature_spotlight": true,
"feature_video_rooms": true
},
"element_call": {
+1 -1
View File
@@ -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.js"],
setupFilesAfterEnv: ["<rootDir>/node_modules/matrix-react-sdk/test/setupTests.ts"],
moduleNameMapper: {
"\\.(css|scss|pcss)$": "<rootDir>/__mocks__/cssMock.js",
"\\.(gif|png|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
+12 -1
View File
@@ -185,9 +185,20 @@ 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);
return (
semver.satisfies(ourApiVersion, moduleApiVersion) ||
backwardsCompatibleMajorVersions.some((version) => semver.satisfies(version, moduleApiVersion))
);
}
function writeModulesTs(content: string): void {
+16 -16
View File
@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.11.36",
"version": "1.11.40",
"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": "node scripts/build-jitsi.js",
"build:jitsi": "ts-node scripts/build-jitsi.ts",
"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": "node ./scripts/analyse_unused_exports.js",
"analyse:unused-exports": "ts-node ./scripts/analyse_unused_exports.ts",
"analyse:webpack-bundles": "webpack-bundle-analyzer webpack-stats.json webapp"
},
"resolutions": {
@@ -70,16 +70,15 @@
},
"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": "^0.0.6",
"@matrix-org/react-sdk-module-api": "^2.0.0",
"gfm.css": "^1.1.2",
"jsrsasign": "^10.5.25",
"katex": "^0.16.0",
"matrix-js-sdk": "27.0.0",
"matrix-react-sdk": "3.76.0",
"matrix-js-sdk": "28.0.0",
"matrix-react-sdk": "3.79.0",
"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": {
@@ -88,6 +87,7 @@
"@babel/eslint-plugin": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
"@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
@@ -109,9 +109,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 +123,15 @@
"cpx": "^1.5.0",
"css-loader": "^4",
"dotenv": "^16.0.2",
"eslint": "8.43.0",
"eslint": "8.45.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^9.0.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": "^47.0.0",
"eslint-plugin-unicorn": "^48.0.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"fake-indexeddb": "^4.0.0",
"fetch-mock-jest": "^1.5.1",
@@ -139,14 +139,14 @@
"fs-extra": "^11.0.0",
"html-webpack-plugin": "^4.5.2",
"jest": "^29.0.0",
"jest-canvas-mock": "2.5.1",
"jest-canvas-mock": "2.5.2",
"jest-environment-jsdom": "^29.0.0",
"jest-mock": "^29.0.0",
"jest-raw-loader": "^1.0.1",
"json-loader": "^0.5.7",
"loader-utils": "^3.0.0",
"matrix-mock-request": "^2.5.0",
"matrix-web-i18n": "^1.4.0",
"matrix-web-i18n": "^2.0.0",
"mini-css-extract-plugin": "^1",
"minimist": "^1.2.6",
"mkdirp": "^3.0.0",
@@ -164,19 +164,19 @@
"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",
"stylelint-config-standard": "^33.0.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-scss": "^5.0.0",
"terser-webpack-plugin": "^4.0.0",
"ts-node": "^10.9.1",
"ts-prune": "^0.10.3",
"typescript": "5.0.4",
"typescript": "5.1.6",
"webpack": "^4.46.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^3.3.12",
@@ -1,13 +1,12 @@
#!/usr/bin/env node
"use strict";
const fs = require("fs");
const { exec } = require("node:child_process");
import * as fs from "node:fs";
import { exec } from "node:child_process";
const includeJSSDK = process.argv.includes("--include-js-sdk");
const ignore = [];
const ignore: string[] = [];
ignore.push(...Object.values(JSON.parse(fs.readFileSync(`${__dirname}/../components.json`))));
ignore.push(...Object.values<string>(JSON.parse(fs.readFileSync(`${__dirname}/../components.json`, "utf-8"))));
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");
@@ -31,7 +30,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((newLines, line) => {
lines = lines.reduce<string[]>((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.
const fs = require("fs");
const path = require("path");
const { mkdirpSync } = require("mkdirp");
const fetch = require("node-fetch");
const ProxyAgent = require("simple-proxy-agent");
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";
console.log("Making webapp directory");
mkdirpSync("webapp");
@@ -16,15 +16,12 @@ mkdirpSync("webapp");
console.log("Downloading Jitsi script");
const fname = path.join("webapp", "jitsi_external_api.min.js");
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)
fetch("https://meet.element.io/libs/external_api.min.js", {
agent: new ProxyAgent(),
})
.then((res) => {
const stream = fs.createWriteStream(fname);
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
res.body.pipe(stream);
res.body.on("error", (err) => reject(err));
res.body.on("finish", () => resolve());
-1
View File
@@ -1 +0,0 @@
../../matrix-react-sdk/scripts/check-i18n.pl
+1 -44
View File
@@ -81,7 +81,6 @@ 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), {});
@@ -158,7 +157,7 @@ function genLangFile(lang, dest) {
const reactSdkFile = "node_modules/matrix-react-sdk/src/i18n/strings/" + lang + ".json";
const riotWebFile = "src/i18n/strings/" + lang + ".json";
let translations = {};
const translations = {};
[reactSdkFile, riotWebFile].forEach(function (f) {
if (fs.existsSync(f)) {
try {
@@ -170,8 +169,6 @@ 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);
@@ -207,46 +204,6 @@ function genLangList(langFileMap) {
}
}
/**
* 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
+2 -7
View File
@@ -32,7 +32,8 @@ type ElectronChannel =
| "setBadgeCount"
| "update-downloaded"
| "userDownloadCompleted"
| "userDownloadAction";
| "userDownloadAction"
| "openDesktopCapturerSourcePicker";
declare global {
interface Window {
@@ -54,12 +55,6 @@ 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
+1 -1
View File
@@ -1 +1 @@
{}
{}
+2 -1
View File
@@ -27,5 +27,6 @@
"Use %(brand)s on mobile": "Používání %(brand)s v mobilních zařízeních",
"Decentralised, encrypted chat &amp; 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"
"%(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"
}
+1 -1
View File
@@ -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": "Gehe zu deinem Browser, um die Anmeldung abzuschließen",
"Go to your browser to complete Sign In": "Browser öffnen, 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",
+2 -1
View File
@@ -27,5 +27,6 @@
"Your Element is misconfigured": "Anda salah mengatur Element",
"Decentralised, encrypted chat &amp; collaboration powered by $matrixLogo": "Obrolan &amp; 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"
"%(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"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"Use %(brand)s on mobile": "Usa %(brand)s su mobile",
"Decentralised, encrypted chat &amp; 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"
"%(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"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"%(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"
"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-თან ერთად"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"Your Element is misconfigured": "당신의 Element가 잘못 설정되었습니다",
"Decentralised, encrypted chat &amp; 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"
"%(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을 지정할 수 없습니다."
}
+6 -5
View File
@@ -1,5 +1,5 @@
{
"Dismiss": "Aizvērt",
"Dismiss": "Atmest",
"Unknown device": "Nezināma ierīce",
"Welcome to Element": "Laipni lūdzam Element!",
"Sign In": "Pieteikties",
@@ -7,25 +7,26 @@
"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 pārsētāja ir: %(message)s",
"The message from the parser is: %(message)s": "Ziņa no parsē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 riskus un vēlos turpināt",
"I understand the risks and wish to continue": "Es apzinos iespējamās sekas 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": "Lejuplāde ir pabeigta",
"Download Completed": "Lejupielā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 &amp; 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"
"%(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"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"Use %(brand)s on mobile": "Użyj %(brand)s w telefonie",
"Decentralised, encrypted chat &amp; 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"
"%(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"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"Use %(brand)s on mobile": "Používať %(brand)s na mobilnom zariadení",
"Decentralised, encrypted chat &amp; 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"
"%(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"
}
+3 -2
View File
@@ -21,11 +21,12 @@
"%(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 riziko in želim vseeno nadaljevati",
"I understand the risks and wish to continue": "Razumem tveganje 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 &amp; 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"
"%(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"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"Use %(brand)s on mobile": "Använd %(brand)s på mobilen",
"Decentralised, encrypted chat &amp; collaboration powered by $matrixLogo": "Decentraliserad krypterad chatt &amp; 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"
"%(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"
}
+2 -1
View File
@@ -27,5 +27,6 @@
"Your Element is misconfigured": "Element đang bị thiết lập sai",
"Decentralised, encrypted chat &amp; collaboration powered by $matrixLogo": "Dịch vụ nhắn tin &amp; 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"
"%(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"
}
-27
View File
@@ -34,7 +34,6 @@ 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 { QueryDict, encodeParams } from "matrix-js-sdk/src/utils";
import { parseQs } from "./url_utils";
import VectorBasePlatform from "./platform/VectorBasePlatform";
@@ -48,31 +47,6 @@ 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;
@@ -138,7 +112,6 @@ export async function loadApp(fragParams: {}): Promise<ReactElement> {
return (
<MatrixChat
onNewScreen={onNewScreen}
makeRegistrationUrl={makeRegistrationUrl}
config={config}
realQueryParams={params}
startingFragmentQueryParams={fragParams}
+9
View File
@@ -43,6 +43,7 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { BreadcrumbsStore } from "matrix-react-sdk/src/stores/BreadcrumbsStore";
import { UPDATE_EVENT } from "matrix-react-sdk/src/stores/AsyncStore";
import { avatarUrlForRoom, getInitialLetter } from "matrix-react-sdk/src/Avatar";
import DesktopCapturerSourcePicker from "matrix-react-sdk/src/components/views/elements/DesktopCapturerSourcePicker";
import VectorBasePlatform from "./VectorBasePlatform";
import { SeshatIndexManager } from "./SeshatIndexManager";
@@ -163,6 +164,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
});
window.electron.on("openDesktopCapturerSourcePicker", () => {
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
finished.then(([source]) => {
if (!source) return;
this.ipc.call("callDisplayMediaCallback", source);
});
});
this.ipc.call("startSSOFlow", this.ssoID);
BreadcrumbsStore.instance.on(UPDATE_EVENT, this.onBreadcrumbsUpdate);
+2 -1
View File
@@ -38,7 +38,8 @@ export function initRageshake(): Promise<void> {
() => {
logger.log("Initialised rageshake.");
logger.log(
"To fix line numbers in Chrome: " + "Meatball menu → Settings → Ignore list → Add /rageshake\\.js$",
"To fix line numbers in Chrome: " +
"Meatball menu → Settings → Ignore list → Add /rageshake\\.ts & /logger\\.ts$",
);
window.addEventListener("beforeunload", () => {
+10 -10
View File
@@ -143,9 +143,6 @@ describe("loading:", function () {
enableGuest={true}
onTokenLoginCompleted={resolve}
initialScreenAfterLogin={getScreenFromLocation(windowLocation!)}
makeRegistrationUrl={(): string => {
throw new Error("Not implemented");
}}
/>,
);
});
@@ -158,10 +155,8 @@ 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: ["r0.3.0"],
unstable_features: {
"m.lazy_load_members": true,
},
versions: ["v1.1"],
unstable_features: {},
});
const isGuest = opts?.isGuest;
if (!isGuest) {
@@ -220,7 +215,7 @@ describe("loading:", function () {
});
// Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: ["r0.4.0"] });
httpBackend.when("GET", "/versions").respond(200, { versions: ["v1.1"] });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
return sleep(1)
@@ -270,7 +265,7 @@ describe("loading:", function () {
});
// Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: ["r0.4.0"] });
httpBackend.when("GET", "/versions").respond(200, { versions: ["v1.1"] });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
return awaitLoginComponent(matrixChat)
@@ -283,7 +278,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/r0/login", "/versions", "/_matrix/identity/v2"];
const allowedRequests = ["/_matrix/client/v3/login", "/versions", "/_matrix/identity/v2"];
for (const req of httpBackend.requests) {
if (req.method === "GET" && allowedRequests.find((p) => req.path.endsWith(p))) {
continue;
@@ -592,6 +587,11 @@ describe("loading:", function () {
return tokenLoginCompletePromise;
})
.then(() => {
return expectAndAwaitSync().catch((e) => {
throw new Error("Never got /sync after login: did the client start?");
});
})
.then(() => {
// check that the localstorage has been set up in such a way that
// the reloaded app can pick up where we leave off.
+1 -1
View File
@@ -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: [],
versions: ["v1.1"],
});
fetchMock.get("https://matrix.org/.well-known/matrix/client", {
"m.homeserver": {
@@ -21,6 +21,9 @@ import { Action } from "matrix-react-sdk/src/dispatcher/actions";
import dispatcher from "matrix-react-sdk/src/dispatcher/dispatcher";
import * as rageshake from "matrix-react-sdk/src/rageshake/rageshake";
import { BreadcrumbsStore } from "matrix-react-sdk/src/stores/BreadcrumbsStore";
import Modal from "matrix-react-sdk/src/Modal";
import DesktopCapturerSourcePicker from "matrix-react-sdk/src/components/views/elements/DesktopCapturerSourcePicker";
import { mocked } from "jest-mock";
import ElectronPlatform from "../../../../src/vector/platform/ElectronPlatform";
@@ -76,6 +79,35 @@ describe("ElectronPlatform", () => {
expect(dispatchFireSpy).toHaveBeenCalledWith(Action.ViewUserSettings);
});
it("creates a modal on openDesktopCapturerSourcePicker", async () => {
const plat = new ElectronPlatform();
Modal.createDialog = jest.fn();
// @ts-ignore mock
mocked(Modal.createDialog).mockReturnValue({
finished: new Promise((r) => r(["source"])),
});
let res: () => void;
const waitForIPCSend = new Promise<void>((r) => {
res = r;
});
// @ts-ignore mock
jest.spyOn(plat.ipc, "call").mockImplementation(() => {
res();
});
const [event, handler] = getElectronEventHandlerCall("openDesktopCapturerSourcePicker")!;
handler();
await waitForIPCSend;
expect(event).toBeTruthy();
expect(Modal.createDialog).toHaveBeenCalledWith(DesktopCapturerSourcePicker);
// @ts-ignore mock
expect(plat.ipc.call).toHaveBeenCalledWith("callDisplayMediaCallback", "source");
});
describe("updates", () => {
it("dispatches on check updates action", () => {
new ElectronPlatform();
@@ -45,6 +45,7 @@ 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);
+19 -4
View File
@@ -216,8 +216,11 @@ 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"),
// and sanitize-html & matrix-events-sdk & matrix-widget-api
"sanitize-html": path.resolve(__dirname, "node_modules/sanitize-html"),
"@matrix-org/react-sdk-module-api": path.resolve(
__dirname,
"node_modules/@matrix-org/react-sdk-module-api",
),
// and matrix-events-sdk & matrix-widget-api
"matrix-events-sdk": path.resolve(__dirname, "node_modules/matrix-events-sdk"),
"matrix-widget-api": path.resolve(__dirname, "node_modules/matrix-widget-api"),
@@ -272,6 +275,12 @@ 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
@@ -720,14 +729,20 @@ 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)[/\\]/;
if (!resourcePath.match(prefix)) {
/**
* 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)) {
throw new Error(`Unexpected asset path: ${resourcePath}`);
}
let outputDir = path.dirname(resourcePath).replace(prefix, "");
if (resourcePath.includes("KaTeX")) {
if (isKaTeX) {
// Add a clearly named directory segment, rather than leaving the KaTeX
// assets loose in each asset type directory.
outputDir = path.join(outputDir, "KaTeX");
+2017 -1784
View File
File diff suppressed because it is too large Load Diff