From 536ffc2fbf002d78effc635902a8325927b3a711 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 1 Mar 2021 09:26:58 +0100 Subject: [PATCH 1/4] Disable telemetry which was introduced with react-admin v3.11.0 (#109) --- src/App.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.js b/src/App.js index ec240a5..3afdff8 100644 --- a/src/App.js +++ b/src/App.js @@ -29,6 +29,7 @@ const i18nProvider = polyglotI18nProvider( const App = () => ( Date: Tue, 2 Mar 2021 04:45:05 -0600 Subject: [PATCH 2/4] Name device used by Synapse Admin and hook up logout button (#113) * Name device used by Synapse Admin * Actually logout when the logout button is pressed so that old sessions get deleted * Fix lint --- src/synapse/authProvider.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/synapse/authProvider.js b/src/synapse/authProvider.js index 30ce600..11db5f0 100644 --- a/src/synapse/authProvider.js +++ b/src/synapse/authProvider.js @@ -10,6 +10,7 @@ const authProvider = { type: "m.login.password", user: username, password: password, + initial_device_display_name: "Synapse Admin", }), }; @@ -30,9 +31,24 @@ const authProvider = { }, // called when the user clicks on the logout button logout: () => { - console.log("logout "); - localStorage.removeItem("access_token"); - return Promise.resolve(); + console.log("logout"); + + const logout_api_url = + localStorage.getItem("base_url") + "/_matrix/client/r0/logout"; + const token = localStorage.getItem("access_token"); + + const options = { + method: "POST", + user: { + authenticated: true, + token: `Bearer ${token}`, + }, + }; + + return fetchUtils.fetchJson(logout_api_url, options).then(({ json }) => { + localStorage.removeItem("access_token"); + localStorage.removeItem("device_id"); + }); }, // called when the API returns an error checkError: ({ status }) => { From 96d2c967400c6ee648bb6520bbcea05ff795e514 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 13:29:43 +0100 Subject: [PATCH 3/4] Bump elliptic from 6.5.3 to 6.5.4 (#122) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1b9b64e..0a394ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2643,10 +2643,10 @@ bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.0.0, bn.js@^5.1.1: version "5.1.3" @@ -2717,7 +2717,7 @@ braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -4207,17 +4207,17 @@ electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.591: integrity sha512-nLO2Wd2yU42eSoNJVQKNf89CcEGqeFZd++QsnN2XIgje1s/19AgctfjLIbPORlvcCO8sYjLwX4iUgDdusOY8Sg== elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" emoji-regex@^7.0.1, emoji-regex@^7.0.2: version "7.0.3" @@ -5528,7 +5528,7 @@ history@^4.9.0: tiny-warning "^1.0.0" value-equal "^1.0.1" -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -7468,7 +7468,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= From 8ff0ac913cadd4c18a0ac3c367751326bbb0b72f Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Tue, 16 Mar 2021 12:12:54 +0100 Subject: [PATCH 4/4] Add missing translations Change-Id: Ie46554bcd10dde771c03e7d3fd0c3639f904429d --- src/i18n/de.js | 4 ++++ src/i18n/en.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/de.js b/src/i18n/de.js index f20ef18..2f49344 100644 --- a/src/i18n/de.js +++ b/src/i18n/de.js @@ -276,6 +276,10 @@ export default { }, ra: { ...germanMessages.ra, + action: { + ...germanMessages.ra.action, + unselect: "Abwählen", + }, auth: { ...germanMessages.ra.auth, auth_check_error: "Anmeldung fehlgeschlagen", diff --git a/src/i18n/en.js b/src/i18n/en.js index bb3ac3b..1cf3033 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -6,6 +6,7 @@ export default { auth: { base_url: "Homeserver URL", welcome: "Welcome to Synapse-admin", + server_version: "Synapse version", username_error: "Please enter fully qualified user ID: '@user:domain'", protocol_error: "URL has to start with 'http://' or 'https://'", url_error: "Not a valid Matrix server URL", @@ -139,7 +140,7 @@ export default { name: "Name", canonical_alias: "Alias", joined_members: "Members", - joined_local_members: "local members", + joined_local_members: "Local members", state_events: "State events", version: "Version", is_encrypted: "Encrypted",