Compare commits
86 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 245d13875f | |||
| e7cb419902 | |||
| 54b78a64b8 | |||
| 37faa1caa9 | |||
| 49dfa4ee6c | |||
| e6e701f5e9 | |||
| c04daeaa20 | |||
| 1d54312c9f | |||
| fbb7d457e7 | |||
| 95d63d88ee | |||
| af70b09fd7 | |||
| 9b5db05115 | |||
| 954ade8c23 | |||
| 5688079f72 | |||
| c5280f0d83 | |||
| 153f6f1583 | |||
| 940f44c6d3 | |||
| 481f67514b | |||
| 90919c20c3 | |||
| 3219cc7605 | |||
| 89128f28fa | |||
| e0c9a6cc8e | |||
| 5e6b791617 | |||
| 2f0129425d | |||
| 5ec0ca9175 | |||
| 25b15d084d | |||
| 3840fc23bd | |||
| 9babd7bcd8 | |||
| f64b1a9f0e | |||
| 81da85dac4 | |||
| bf88906de8 | |||
| fba49186ed | |||
| 4b5b0e9244 | |||
| 7cde32ed2e | |||
| e136afe2eb | |||
| cdb4c88b8c | |||
| 77edbc27f8 | |||
| 87fedc27b1 | |||
| 9d56b56116 | |||
| bdb03c4490 | |||
| b70eb4aba7 | |||
| cfa47eec00 | |||
| 13efb396a9 | |||
| 7619e35638 | |||
| 7f735a6c6e | |||
| 331678b913 | |||
| b23aad28ca | |||
| ebc1d01f30 | |||
| ae2e3e8502 | |||
| c7a935777d | |||
| 26fef6f294 | |||
| 827be982b7 | |||
| c3382199bf | |||
| 75e4d16462 | |||
| b03b4582c0 | |||
| 1aa04fa83c | |||
| 2635fc95f4 | |||
| 43695fbc58 | |||
| 8289d6937f | |||
| 2877ef8fcf | |||
| f65231268d | |||
| bd4c6b8c6c | |||
| a0f55c9e8f | |||
| fcf1f06b31 | |||
| a79a05cd52 | |||
| ca8cbacad7 | |||
| 2194e4cc10 | |||
| 43afa4c1e0 | |||
| 322c957f7f | |||
| 6c476bdc0d | |||
| 7aca548f65 | |||
| 80bc659b11 | |||
| 5646f3aff8 | |||
| 22a25f0e95 | |||
| 0b6789c290 | |||
| 202f3de54b | |||
| 54ebd0cca1 | |||
| 66ada58101 | |||
| 2983215dee | |||
| f8da8254ce | |||
| 76d9f26a16 | |||
| 078d6a0d98 | |||
| d914b13c1b | |||
| 6764c7e779 | |||
| c044e1a00c | |||
| 8fdb41412f |
@@ -1,3 +1,11 @@
|
||||
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst before submitting your pull request -->
|
||||
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md before submitting your pull request -->
|
||||
|
||||
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst#sign-off -->
|
||||
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md#sign-off -->
|
||||
|
||||
<!-- To specify text for the changelog entry (otherwise the PR title will be used):
|
||||
Notes:
|
||||
|
||||
Changelog entries will also appear in element-desktop. For PRs that *only* affect the desktop version:
|
||||
Notes: none
|
||||
element-desktop notes: <notes>
|
||||
-->
|
||||
|
||||
+126
@@ -1,3 +1,129 @@
|
||||
Changes in [1.7.34](https://github.com/vector-im/element-desktop/releases/tag/v1.7.34) (2021-07-02)
|
||||
===================================================================================================
|
||||
|
||||
## 🔒 SECURITY FIXES
|
||||
* Sanitize untrusted variables from message previews before translation
|
||||
Fixes vector-im/element-web#18314
|
||||
|
||||
## ✨ Features
|
||||
* Fix editing of `<sub>` & `<sup`> & `<u>`
|
||||
[\#6469](https://github.com/matrix-org/matrix-react-sdk/pull/6469)
|
||||
Fixes #18211
|
||||
* Zoom images in lightbox to where the cursor points
|
||||
[\#6418](https://github.com/matrix-org/matrix-react-sdk/pull/6418)
|
||||
Fixes #17870
|
||||
* Avoid hitting the settings store from TextForEvent
|
||||
[\#6205](https://github.com/matrix-org/matrix-react-sdk/pull/6205)
|
||||
Fixes #17650
|
||||
* Initial MSC3083 + MSC3244 support
|
||||
[\#6212](https://github.com/matrix-org/matrix-react-sdk/pull/6212)
|
||||
Fixes #17686 and #17661
|
||||
* Navigate to the first room with notifications when clicked on space notification dot
|
||||
[\#5974](https://github.com/matrix-org/matrix-react-sdk/pull/5974)
|
||||
* Add matrix: to the list of permitted URL schemes
|
||||
[\#6388](https://github.com/matrix-org/matrix-react-sdk/pull/6388)
|
||||
* Add "Copy Link" to room context menu
|
||||
[\#6374](https://github.com/matrix-org/matrix-react-sdk/pull/6374)
|
||||
* 💭 Message bubble layout
|
||||
[\#6291](https://github.com/matrix-org/matrix-react-sdk/pull/6291)
|
||||
Fixes #4635, #17773 #16220 and #7687
|
||||
* Play only one audio file at a time
|
||||
[\#6417](https://github.com/matrix-org/matrix-react-sdk/pull/6417)
|
||||
Fixes #17439
|
||||
* Move download button for media to the action bar
|
||||
[\#6386](https://github.com/matrix-org/matrix-react-sdk/pull/6386)
|
||||
Fixes #17943
|
||||
* Improved display of one-to-one call history with summary boxes for each call
|
||||
[\#6121](https://github.com/matrix-org/matrix-react-sdk/pull/6121)
|
||||
Fixes #16409
|
||||
* Notification settings UI refresh
|
||||
[\#6352](https://github.com/matrix-org/matrix-react-sdk/pull/6352)
|
||||
Fixes #17782
|
||||
* Fix EventIndex double handling events and erroring
|
||||
[\#6385](https://github.com/matrix-org/matrix-react-sdk/pull/6385)
|
||||
Fixes #18008
|
||||
* Improve reply rendering
|
||||
[\#3553](https://github.com/matrix-org/matrix-react-sdk/pull/3553)
|
||||
Fixes vector-im/riot-web#9217, vector-im/riot-web#7633, vector-im/riot-web#7530, vector-im/riot-web#7169, vector-im/riot-web#7151, vector-im/riot-web#6692 vector-im/riot-web#6579 and #17440
|
||||
* Improve performance of room name calculation
|
||||
[\#1801](https://github.com/matrix-org/matrix-js-sdk/pull/1801)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix browser history getting stuck looping back to the same room
|
||||
[\#18053](https://github.com/vector-im/element-web/pull/18053)
|
||||
* Fix space shortcuts on layouts with non-English keys in the places of numbers
|
||||
[\#17780](https://github.com/vector-im/element-web/pull/17780)
|
||||
Fixes #17776
|
||||
* Fix CreateRoomDialog exploding when making public room outside of a space
|
||||
[\#6493](https://github.com/matrix-org/matrix-react-sdk/pull/6493)
|
||||
* Fix regression where registration would soft-crash on captcha
|
||||
[\#6505](https://github.com/matrix-org/matrix-react-sdk/pull/6505)
|
||||
Fixes #18284
|
||||
* only send join rule event if we have a join rule to put in it
|
||||
[\#6517](https://github.com/matrix-org/matrix-react-sdk/pull/6517)
|
||||
* Improve the new download button's discoverability and interactions.
|
||||
[\#6510](https://github.com/matrix-org/matrix-react-sdk/pull/6510)
|
||||
* Fix voice recording UI looking broken while microphone permissions are being requested.
|
||||
[\#6479](https://github.com/matrix-org/matrix-react-sdk/pull/6479)
|
||||
Fixes #18223
|
||||
* Match colors of room and user avatars in DMs
|
||||
[\#6393](https://github.com/matrix-org/matrix-react-sdk/pull/6393)
|
||||
Fixes #2449
|
||||
* Fix onPaste handler to work with copying files from Finder
|
||||
[\#5389](https://github.com/matrix-org/matrix-react-sdk/pull/5389)
|
||||
Fixes #15536 and #16255
|
||||
* Fix infinite pagination loop when offline
|
||||
[\#6478](https://github.com/matrix-org/matrix-react-sdk/pull/6478)
|
||||
Fixes #18242
|
||||
* Fix blurhash rounded corners missing regression
|
||||
[\#6467](https://github.com/matrix-org/matrix-react-sdk/pull/6467)
|
||||
Fixes #18110
|
||||
* Fix position of the space hierarchy spinner
|
||||
[\#6462](https://github.com/matrix-org/matrix-react-sdk/pull/6462)
|
||||
Fixes #18182
|
||||
* Fix display of image messages that lack thumbnails
|
||||
[\#6456](https://github.com/matrix-org/matrix-react-sdk/pull/6456)
|
||||
Fixes #18175
|
||||
* Fix crash with large audio files.
|
||||
[\#6436](https://github.com/matrix-org/matrix-react-sdk/pull/6436)
|
||||
Fixes #18149
|
||||
* Make diff colors in codeblocks more pleasant
|
||||
[\#6355](https://github.com/matrix-org/matrix-react-sdk/pull/6355)
|
||||
Fixes #17939
|
||||
* Show the correct audio file duration while loading the file.
|
||||
[\#6435](https://github.com/matrix-org/matrix-react-sdk/pull/6435)
|
||||
Fixes #18160
|
||||
* Fix various timeline settings not applying immediately.
|
||||
[\#6261](https://github.com/matrix-org/matrix-react-sdk/pull/6261)
|
||||
Fixes #17748
|
||||
* Fix issues with room list duplication
|
||||
[\#6391](https://github.com/matrix-org/matrix-react-sdk/pull/6391)
|
||||
Fixes #14508
|
||||
* Fix grecaptcha throwing useless error sometimes
|
||||
[\#6401](https://github.com/matrix-org/matrix-react-sdk/pull/6401)
|
||||
Fixes #15142
|
||||
* Update Emojibase and Twemoji and switch to IamCal (Slack-style) shortcodes
|
||||
[\#6347](https://github.com/matrix-org/matrix-react-sdk/pull/6347)
|
||||
Fixes #13857 and #13334
|
||||
* Respect compound emojis in default avatar initial generation
|
||||
[\#6397](https://github.com/matrix-org/matrix-react-sdk/pull/6397)
|
||||
Fixes #18040
|
||||
* Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
|
||||
[\#6394](https://github.com/matrix-org/matrix-react-sdk/pull/6394)
|
||||
Fixes #18031
|
||||
* Standardise spelling and casing of homeserver, identity server, and integration manager
|
||||
[\#6365](https://github.com/matrix-org/matrix-react-sdk/pull/6365)
|
||||
* Fix widgets not receiving decrypted events when they have permission.
|
||||
[\#6371](https://github.com/matrix-org/matrix-react-sdk/pull/6371)
|
||||
Fixes #17615
|
||||
* Prevent client hangs when calculating blurhashes
|
||||
[\#6366](https://github.com/matrix-org/matrix-react-sdk/pull/6366)
|
||||
Fixes #17945
|
||||
* Exclude state events from widgets reading room events
|
||||
[\#6378](https://github.com/matrix-org/matrix-react-sdk/pull/6378)
|
||||
* Cache feature_spaces\* flags to improve performance
|
||||
[\#6381](https://github.com/matrix-org/matrix-react-sdk/pull/6381)
|
||||
|
||||
Changes in [1.7.33](https://github.com/vector-im/element-web/releases/tag/v1.7.33) (2021-07-19)
|
||||
===============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.33-rc.1...v1.7.33)
|
||||
|
||||
+3
-2
@@ -8,8 +8,9 @@
|
||||
|
||||
## Step 0: Join #element-translations:matrix.org
|
||||
|
||||
1. Come and join https://matrix.to/#/#element-translations:matrix.org
|
||||
2. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)
|
||||
1. Come and join https://matrix.to/#/#element-translations:matrix.org for general discussion
|
||||
2. Join https://matrix.to/#/#element-translators:matrix.org for language-specific rooms
|
||||
3. Read scrollback and/or ask if anyone else is working on your language, and co-ordinate if needed. In general little-or-no coordination is needed though :)
|
||||
|
||||
## Step 1: Preparing your Weblate Profile
|
||||
|
||||
|
||||
+12
-7
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "element-web",
|
||||
"version": "1.7.33",
|
||||
"version": "1.7.34",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"repository": {
|
||||
@@ -48,7 +48,8 @@
|
||||
"start:res": "yarn build:jitsi && node scripts/copy-res.js -w",
|
||||
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --progress --mode development --disable-host-check",
|
||||
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
|
||||
"lint:js": "eslint src",
|
||||
"lint:js": "eslint --max-warnings 0 src",
|
||||
"lint:js-fix": "eslint --fix src",
|
||||
"lint:types": "tsc --noEmit --jsx react",
|
||||
"lint:style": "stylelint 'res/css/**/*.scss'",
|
||||
"test": "jest"
|
||||
@@ -60,8 +61,8 @@
|
||||
"highlight.js": "^10.5.0",
|
||||
"jsrsasign": "^10.2.0",
|
||||
"katex": "^0.12.0",
|
||||
"matrix-js-sdk": "12.1.0",
|
||||
"matrix-react-sdk": "3.26.0",
|
||||
"matrix-js-sdk": "12.2.0",
|
||||
"matrix-react-sdk": "3.27.0",
|
||||
"matrix-widget-api": "^0.1.0-beta.15",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^17.0.2",
|
||||
@@ -141,16 +142,19 @@
|
||||
"shell-escape": "^0.2.0",
|
||||
"simple-proxy-agent": "^1.1.0",
|
||||
"stylelint": "^13.9.0",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"stylelint-scss": "^3.18.0",
|
||||
"terser-webpack-plugin": "^2.3.8",
|
||||
"typescript": "^4.1.3",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-dev-server": "^3.11.2"
|
||||
"webpack-dev-server": "^3.11.2",
|
||||
"worker-loader": "^2.0.0"
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "jest-environment-jsdom-sixteen",
|
||||
"testMatch": [
|
||||
"<rootDir>/test/**/*-test.js"
|
||||
"<rootDir>/test/**/*-test.[tj]s"
|
||||
],
|
||||
"setupFilesAfterEnv": [
|
||||
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
|
||||
@@ -168,7 +172,8 @@
|
||||
"decoderWorker\\.min\\.wasm": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
|
||||
"waveWorker\\.min\\.js": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
|
||||
"context-filter-polyfill": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
|
||||
"FontManager.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/FontManager.js"
|
||||
"FontManager.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/FontManager.js",
|
||||
"workers/(.+)\\.worker\\.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/workerMock.js"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"/node_modules/(?!matrix-js-sdk).+$",
|
||||
|
||||
@@ -71,7 +71,7 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
|
||||
android = [];
|
||||
}
|
||||
|
||||
let mobileHeader = <h2 id="step2_heading">{_t("Use %(brand)s on mobile", { brand })}</h2>;
|
||||
let mobileHeader = <h2 id="step2_heading">{ _t("Use %(brand)s on mobile", { brand }) }</h2>;
|
||||
if (!android.length && !ios) {
|
||||
mobileHeader = null;
|
||||
}
|
||||
@@ -102,11 +102,11 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
|
||||
'or <safariLink>Safari</safariLink> for the best experience.',
|
||||
{},
|
||||
{
|
||||
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{sub}</a>,
|
||||
'firefoxLink': (sub) => <a href="https://firefox.com">{sub}</a>,
|
||||
'safariLink': (sub) => <a href="https://apple.com/safari">{sub}</a>,
|
||||
'chromeLink': (sub) => <a href="https://www.google.com/chrome">{ sub }</a>,
|
||||
'firefoxLink': (sub) => <a href="https://firefox.com">{ sub }</a>,
|
||||
'safariLink': (sub) => <a href="https://apple.com/safari">{ sub }</a>,
|
||||
},
|
||||
)}
|
||||
) }
|
||||
</p>
|
||||
<p>
|
||||
{ _t(
|
||||
@@ -124,9 +124,9 @@ const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
|
||||
<div className="mx_HomePage_col">
|
||||
<div className="mx_HomePage_row">
|
||||
<div>
|
||||
{mobileHeader}
|
||||
{ios}
|
||||
{android}
|
||||
{ mobileHeader }
|
||||
{ ios }
|
||||
{ android }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,9 +40,9 @@ const ErrorView: React.FC<IProps> = ({ title, messages }) => {
|
||||
<div className="mx_HomePage_row">
|
||||
<div>
|
||||
<h2 id="step1_heading">{ title }</h2>
|
||||
{messages && messages.map(msg => <p key={msg}>
|
||||
{ messages && messages.map(msg => <p key={msg}>
|
||||
{ msg }
|
||||
</p>)}
|
||||
</p>) }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,14 +35,14 @@ const VectorAuthFooter = () => {
|
||||
for (const linkEntry of links) {
|
||||
authFooterLinks.push(
|
||||
<a href={linkEntry.url} key={linkEntry.text} target="_blank" rel="noreferrer noopener">
|
||||
{linkEntry.text}
|
||||
{ linkEntry.text }
|
||||
</a>,
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mx_AuthFooter">
|
||||
{authFooterLinks}
|
||||
{ authFooterLinks }
|
||||
<a href="https://matrix.org" target="_blank" rel="noreferrer noopener">{ _t('Powered by Matrix') }</a>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -32,5 +32,7 @@
|
||||
"I understand the risks and wish to continue": "Entenc els riscos i vull continuar",
|
||||
"Go to element.io": "Vés a element.io",
|
||||
"Failed to start": "Ha fallat l'inici",
|
||||
"Missing indexeddb worker script!": "Falta l'script del treballador indexeddb!"
|
||||
"Missing indexeddb worker script!": "Falta l'script del treballador indexeddb!",
|
||||
"Use %(brand)s on mobile": "Utilitza %(brand)s al mòbil",
|
||||
"Switch to space by number": "Canvia d'espai per número"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"Missing indexeddb worker script!": "Missing indexeddb worker script!",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "Invalid configuration: no default server specified.",
|
||||
"Your Element is misconfigured": "Your Element is misconfigured",
|
||||
|
||||
@@ -33,5 +33,6 @@
|
||||
"Go to element.io": "برو به element.io",
|
||||
"Failed to start": "مشکل در آغاز",
|
||||
"Powered by Matrix": "قدرتگرفته از ماتریکس",
|
||||
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی"
|
||||
"Use %(brand)s on mobile": "استفاده از %(brand)s روی گوشی",
|
||||
"Switch to space by number": "تغییر به فضا با شماره"
|
||||
}
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
"Unknown device": "מכשיר לא ידוע",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "עליך להשתמש ב HTTPS בכדי לבצע שיחת ווידאו משותפת.",
|
||||
"Welcome to Element": "ברוכים הבאים ל Element",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "צא'ט וכלי שיתוף פעולה מבוזר ומוצפן & מופעל ע\"י [matrix]",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "צא'ט וכלי שיתוף פעולה מבוזר ומוצפן & מופעל באמצעות [matrix]",
|
||||
"Invalid JSON": "JSON לא חוקי",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "תצורה שגויה: ניתן לציין רק אחד מהערכים הבאים, default_server_config, default_server_name, או default_hs_url.",
|
||||
"Invalid configuration: no default server specified.": "תצורה שגויה: לא צוין שרת ברירת מחדל.",
|
||||
"Open user settings": "פתח הגדרות משתמש",
|
||||
"Go to your browser to complete Sign In": "עבור לדפדפן להמשך ההתחברות",
|
||||
"Explore rooms": "שיטוט בחדרים",
|
||||
"Explore rooms": "גלה חדרים",
|
||||
"Create Account": "יצירת חשבון",
|
||||
"Sign In": "כניסה",
|
||||
"Previous/next recently visited room or community": "הבא\\קודם חדרים וקהילות שביקרתם לאחרונה",
|
||||
"Open": "פתח",
|
||||
"Download Completed": "ההורדה הושלמה",
|
||||
"Unexpected error preparing the app. See console for details.": "שגיאה לא צפויה במהלך הכנת האפליקציה. ראו קונסול לפרטים נוספים.",
|
||||
"Unable to load config file: please refresh the page to try again.": "לא יכול לטעון את קובץ ההגדרות: יש לרענן את הדף כדי לנסות שנית.",
|
||||
"Unexpected error preparing the app. See console for details.": "שגיאה לא צפויה במהלך טעינת האפליקציה. ראו קונסול לפרטים נוספים.",
|
||||
"Unable to load config file: please refresh the page to try again.": "לא ניתן לטעון את קובץ ההגדרות: יש לרענן את הדף כדי לנסות שנית.",
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "האלמנט מכיל הגדרת JSON שגויה, אנא תקנו את הבעיה ואתחלו את הדף.",
|
||||
"Your Element is misconfigured": "האלמנט מוגדר באופן שגוי",
|
||||
"Go to element.io": "חזור לאתר הראשי: element.io",
|
||||
|
||||
@@ -7,5 +7,32 @@
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Obrolan terenkripsi, terdesentralisasi & kolaborasi didukung oleh [matrix]",
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Konfigurasi Element Anda mengandung JSON yang tidak valid. Mohon perbaiki masalahnya dan muat ulang halaman nya.",
|
||||
"Invalid configuration: no default server specified.": "Konfigurasi tidak valid: server default belum ditentukan.",
|
||||
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!"
|
||||
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!",
|
||||
"Explore rooms": "Jelajahi ruang",
|
||||
"Create Account": "Buat Akun",
|
||||
"Switch to space by number": "Beralih ke ruang dengan nomor",
|
||||
"Go to your browser to complete Sign In": "Buka browser Anda untuk menyelesaikan Masuk",
|
||||
"Sign In": "Masuk",
|
||||
"Failed to start": "Gagal untuk memulai",
|
||||
"Go to element.io": "Buka element.io",
|
||||
"I understand the risks and wish to continue": "Saya memahami risikonya dan ingin melanjutkan",
|
||||
"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.": "Anda dapat lanjut menggunakan browser Anda saat ini, tetapi beberapa atau semua fitur mungkin tidak berfungsi dan tampilan serta nuansa aplikasi mungkin salah.",
|
||||
"Please install <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, or <safariLink>Safari</safariLink> for the best experience.": "Mohon instal <chromeLink>Chrome</chromeLink>, <firefoxLink>Firefox</firefoxLink>, atau <safariLink>Safari</safariLink> untuk pengalaman terbaik.",
|
||||
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s menggunakan fitur browser lanjutan yang tidak didukung oleh browser Anda saat ini.",
|
||||
"Your browser can't run %(brand)s": "Browser Anda tidak bisa menjalankan %(brand)s",
|
||||
"Unsupported browser": "Browser tidak didukung",
|
||||
"Use %(brand)s on mobile": "Gunakan %(brand)s di ponsel",
|
||||
"Powered by Matrix": "Didukung oleh Matrix",
|
||||
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
|
||||
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
|
||||
"Previous/next recently visited room or community": "Ruangan atau komunitas yang baru saja dikunjungi sebelum/berikutnya",
|
||||
"Open user settings": "Buka pengaturan pengguna",
|
||||
"Open": "Buka",
|
||||
"Download Completed": "Unduh Selesai",
|
||||
"Unexpected error preparing the app. See console for details.": "Kesalahan tak terduga saat menyiapkan aplikasi. Lihat konsol untuk detail.",
|
||||
"Unable to load config file: please refresh the page to try again.": "Tidak bisa muat file konfigurasi: mohon segarkan halaman untuk mencoba lagi.",
|
||||
"Invalid JSON": "JSON tidak valid",
|
||||
"The message from the parser is: %(message)s": "Pesan dari pengurai adalah: %(message)s",
|
||||
"Your Element is misconfigured": "Element Anda salah dikonfigurasi",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Konfigurasi tidak valid: hanya bisa menentukan satu dari default_server_config, default_server_name, atau default_hs_url."
|
||||
}
|
||||
|
||||
@@ -33,5 +33,6 @@
|
||||
"Unable to load config file: please refresh the page to try again.": "Nu se poate încărca fișierul de configurație: vă rugăm sa reîncărcați pagina și să încercați din nou.",
|
||||
"The message from the parser is: %(message)s": "Mesajul de la parser este: %(message)s",
|
||||
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Configurația ta Element conține JSON invalid. Vă rugăm sa corectați problema și să reîncărcați pagina.",
|
||||
"Invalid configuration: no default server specified.": "Configurație invalidă: niciun server implicit specificat."
|
||||
"Invalid configuration: no default server specified.": "Configurație invalidă: niciun server implicit specificat.",
|
||||
"Switch to space by number": "Comută spațiul folosind un număr"
|
||||
}
|
||||
|
||||
+8
-13
@@ -30,7 +30,6 @@ import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
|
||||
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
|
||||
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
|
||||
import type MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixChat";
|
||||
import { MatrixClientPeg } from 'matrix-react-sdk/src/MatrixClientPeg';
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
import { parseQs, parseQsFromFragment } from './url_utils';
|
||||
@@ -74,6 +73,14 @@ function onNewScreen(screen: string, replaceLast = false) {
|
||||
const hash = '#/' + screen;
|
||||
lastLocationHashSet = hash;
|
||||
|
||||
// if the new hash is a substring of the old one then we are stripping fields e.g `via` so replace history
|
||||
if (screen.startsWith("room/") &&
|
||||
window.location.hash.includes("/$") === hash.includes("/$") && // only if both did or didn't contain event link
|
||||
window.location.hash.startsWith(hash)
|
||||
) {
|
||||
replaceLast = true;
|
||||
}
|
||||
|
||||
if (replaceLast) {
|
||||
window.location.replace(hash);
|
||||
} else {
|
||||
@@ -129,18 +136,6 @@ function onTokenLoginCompleted() {
|
||||
}
|
||||
|
||||
export async function loadApp(fragParams: {}) {
|
||||
// XXX: the way we pass the path to the worker script from webpack via html in body's dataset is a hack
|
||||
// but alternatives seem to require changing the interface to passing Workers to js-sdk
|
||||
const vectorIndexeddbWorkerScript = document.body.dataset.vectorIndexeddbWorkerScript;
|
||||
if (!vectorIndexeddbWorkerScript) {
|
||||
// If this is missing, something has probably gone wrong with
|
||||
// the bundling. The js-sdk will just fall back to accessing
|
||||
// indexeddb directly with no worker script, but we want to
|
||||
// make sure the indexeddb script is present, so fail hard.
|
||||
throw newTranslatableError(_td("Missing indexeddb worker script!"));
|
||||
}
|
||||
MatrixClientPeg.setIndexedDbWorkerScript(vectorIndexeddbWorkerScript);
|
||||
|
||||
window.addEventListener('hashchange', onHashChange);
|
||||
|
||||
const platform = PlatformPeg.get();
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
</head>
|
||||
<body
|
||||
style="height: 100%; margin: 0;"
|
||||
data-vector-indexeddb-worker-script="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("indexeddb-worker.js")) %>"
|
||||
data-vector-recorder-worklet-script="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("recorder-worklet.js")) %>"
|
||||
>
|
||||
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
|
||||
|
||||
@@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { IndexedDBStoreWorker } from 'matrix-js-sdk/src/indexeddb-worker.js';
|
||||
import { IndexedDBStoreWorker } from 'matrix-js-sdk/src/indexeddb-worker';
|
||||
|
||||
const remoteWorker = new IndexedDBStoreWorker(postMessage);
|
||||
const remoteWorker = new IndexedDBStoreWorker(postMessage as InstanceType<typeof Worker>["postMessage"]);
|
||||
|
||||
global.onmessage = remoteWorker.onMessage;
|
||||
|
||||
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
// We have to trick webpack into loading our CSS for us.
|
||||
require("./index.scss");
|
||||
|
||||
import * as qs from 'querystring';
|
||||
import { KJUR } from 'jsrsasign';
|
||||
import {
|
||||
IOpenIDCredentials,
|
||||
@@ -52,15 +51,16 @@ let meetApi: any; // JitsiMeetExternalAPI
|
||||
|
||||
(async function() {
|
||||
try {
|
||||
// The widget's options are encoded into the fragment to avoid leaking info to the server. The widget
|
||||
// spec on the other hand requires the widgetId and parentUrl to show up in the regular query string.
|
||||
const widgetQuery = qs.parse(window.location.hash.substring(1));
|
||||
const query = Object.assign({}, qs.parse(window.location.search.substring(1)), widgetQuery);
|
||||
// The widget's options are encoded into the fragment to avoid leaking info to the server.
|
||||
const widgetQuery = new URLSearchParams(window.location.hash.substring(1));
|
||||
// The widget spec on the other hand requires the widgetId and parentUrl to show up in the regular query string.
|
||||
const realQuery = new URLSearchParams(window.location.search.substring(1));
|
||||
const qsParam = (name: string, optional = false): string => {
|
||||
if (!optional && (!query[name] || typeof (query[name]) !== 'string')) {
|
||||
const vals = widgetQuery.has(name) ? widgetQuery.getAll(name) : realQuery.getAll(name);
|
||||
if (!optional && vals.length !== 1) {
|
||||
throw new Error(`Expected singular ${name} in query string`);
|
||||
}
|
||||
return <string>query[name];
|
||||
return <string>vals[0];
|
||||
};
|
||||
|
||||
// If we have these params, expect a widget API to be available (ie. to be in an iframe
|
||||
|
||||
@@ -326,7 +326,7 @@ body {
|
||||
<a class="mx_Button" id="configure_element_button" href="#">Configure</a>
|
||||
<p class="mx_Subtext mx_SubtextTop">Tap the button above, or manually enable <em>Use custom server</em> and enter:</p>
|
||||
<p class="mx_Subtext">Homeserver: <em id="hs_url"></em></p>
|
||||
<p class="mx_Subtext" id="custom_is">Identity Server: <em id="is_url"></em></p>
|
||||
<p class="mx_Subtext" id="custom_is">Identity server: <em id="is_url"></em></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,10 +22,7 @@ import BaseEventIndexManager, {
|
||||
ICrawlerCheckpoint,
|
||||
IEventAndProfile,
|
||||
IIndexStats,
|
||||
IMatrixEvent,
|
||||
IMatrixProfile,
|
||||
ISearchArgs,
|
||||
ISearchResult,
|
||||
} from 'matrix-react-sdk/src/indexing/BaseEventIndexManager';
|
||||
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
|
||||
import { _t, _td } from 'matrix-react-sdk/src/languageHandler';
|
||||
@@ -54,6 +51,7 @@ import { CheckUpdatesPayload } from "matrix-react-sdk/src/dispatcher/payloads/Ch
|
||||
import ToastStore from "matrix-react-sdk/src/stores/ToastStore";
|
||||
import GenericExpiringToast from "matrix-react-sdk/src/components/views/toasts/GenericExpiringToast";
|
||||
import SettingsStore from 'matrix-react-sdk/src/settings/SettingsStore';
|
||||
import { IMatrixProfile, IEventWithRoomId as IMatrixEvent, IResultRoomEvents } from "matrix-js-sdk/src/@types/search";
|
||||
|
||||
import VectorBasePlatform from './VectorBasePlatform';
|
||||
|
||||
@@ -112,10 +110,10 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
electron.on('seshatReply', this._onIpcReply);
|
||||
electron.on('seshatReply', this.onIpcReply);
|
||||
}
|
||||
|
||||
async _ipcCall(name: string, ...args: any[]): Promise<any> {
|
||||
private async ipcCall(name: string, ...args: any[]): Promise<any> {
|
||||
// TODO this should be moved into the preload.js file.
|
||||
const ipcCallId = ++this.nextIpcCallId;
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -124,7 +122,7 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
||||
});
|
||||
}
|
||||
|
||||
_onIpcReply = (ev: {}, payload: IPCPayload) => {
|
||||
private onIpcReply = (ev: {}, payload: IPCPayload) => {
|
||||
if (payload.id === undefined) {
|
||||
console.warn("Ignoring IPC reply with no ID");
|
||||
return;
|
||||
@@ -145,35 +143,35 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
||||
};
|
||||
|
||||
async supportsEventIndexing(): Promise<boolean> {
|
||||
return this._ipcCall('supportsEventIndexing');
|
||||
return this.ipcCall('supportsEventIndexing');
|
||||
}
|
||||
|
||||
async initEventIndex(userId: string, deviceId: string): Promise<void> {
|
||||
return this._ipcCall('initEventIndex', userId, deviceId);
|
||||
return this.ipcCall('initEventIndex', userId, deviceId);
|
||||
}
|
||||
|
||||
async addEventToIndex(ev: IMatrixEvent, profile: IMatrixProfile): Promise<void> {
|
||||
return this._ipcCall('addEventToIndex', ev, profile);
|
||||
return this.ipcCall('addEventToIndex', ev, profile);
|
||||
}
|
||||
|
||||
async deleteEvent(eventId: string): Promise<boolean> {
|
||||
return this._ipcCall('deleteEvent', eventId);
|
||||
return this.ipcCall('deleteEvent', eventId);
|
||||
}
|
||||
|
||||
async isEventIndexEmpty(): Promise<boolean> {
|
||||
return this._ipcCall('isEventIndexEmpty');
|
||||
return this.ipcCall('isEventIndexEmpty');
|
||||
}
|
||||
|
||||
async isRoomIndexed(roomId: string): Promise<boolean> {
|
||||
return this._ipcCall('isRoomIndexed', roomId);
|
||||
return this.ipcCall('isRoomIndexed', roomId);
|
||||
}
|
||||
|
||||
async commitLiveEvents(): Promise<void> {
|
||||
return this._ipcCall('commitLiveEvents');
|
||||
return this.ipcCall('commitLiveEvents');
|
||||
}
|
||||
|
||||
async searchEventIndex(searchConfig: ISearchArgs): Promise<ISearchResult> {
|
||||
return this._ipcCall('searchEventIndex', searchConfig);
|
||||
async searchEventIndex(searchConfig: ISearchArgs): Promise<IResultRoomEvents> {
|
||||
return this.ipcCall('searchEventIndex', searchConfig);
|
||||
}
|
||||
|
||||
async addHistoricEvents(
|
||||
@@ -181,43 +179,43 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
||||
checkpoint: ICrawlerCheckpoint | null,
|
||||
oldCheckpoint: ICrawlerCheckpoint | null,
|
||||
): Promise<boolean> {
|
||||
return this._ipcCall('addHistoricEvents', events, checkpoint, oldCheckpoint);
|
||||
return this.ipcCall('addHistoricEvents', events, checkpoint, oldCheckpoint);
|
||||
}
|
||||
|
||||
async addCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
return this._ipcCall('addCrawlerCheckpoint', checkpoint);
|
||||
return this.ipcCall('addCrawlerCheckpoint', checkpoint);
|
||||
}
|
||||
|
||||
async removeCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
|
||||
return this.ipcCall('removeCrawlerCheckpoint', checkpoint);
|
||||
}
|
||||
|
||||
async loadFileEvents(args): Promise<IEventAndProfile[]> {
|
||||
return this._ipcCall('loadFileEvents', args);
|
||||
return this.ipcCall('loadFileEvents', args);
|
||||
}
|
||||
|
||||
async loadCheckpoints(): Promise<ICrawlerCheckpoint[]> {
|
||||
return this._ipcCall('loadCheckpoints');
|
||||
return this.ipcCall('loadCheckpoints');
|
||||
}
|
||||
|
||||
async closeEventIndex(): Promise<void> {
|
||||
return this._ipcCall('closeEventIndex');
|
||||
return this.ipcCall('closeEventIndex');
|
||||
}
|
||||
|
||||
async getStats(): Promise<IIndexStats> {
|
||||
return this._ipcCall('getStats');
|
||||
return this.ipcCall('getStats');
|
||||
}
|
||||
|
||||
async getUserVersion(): Promise<number> {
|
||||
return this._ipcCall('getUserVersion');
|
||||
return this.ipcCall('getUserVersion');
|
||||
}
|
||||
|
||||
async setUserVersion(version: number): Promise<void> {
|
||||
return this._ipcCall('setUserVersion', version);
|
||||
return this.ipcCall('setUserVersion', version);
|
||||
}
|
||||
|
||||
async deleteEventIndex(): Promise<void> {
|
||||
return this._ipcCall('deleteEventIndex');
|
||||
return this.ipcCall('deleteEventIndex');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +249,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
rageshake.flush();
|
||||
});
|
||||
|
||||
electron.on('ipcReply', this._onIpcReply);
|
||||
electron.on('ipcReply', this.onIpcReply);
|
||||
electron.on('update-downloaded', this.onUpdateDownloaded);
|
||||
|
||||
electron.on('preferences', () => {
|
||||
@@ -319,11 +317,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
});
|
||||
}
|
||||
|
||||
this._ipcCall("startSSOFlow", this.ssoID);
|
||||
this.ipcCall("startSSOFlow", this.ssoID);
|
||||
}
|
||||
|
||||
async getConfig(): Promise<{}> {
|
||||
return this._ipcCall('getConfig');
|
||||
return this.ipcCall('getConfig');
|
||||
}
|
||||
|
||||
onUpdateDownloaded = async (ev, { releaseNotes, releaseName }) => {
|
||||
@@ -390,7 +388,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
room_id: room.roomId,
|
||||
});
|
||||
window.focus();
|
||||
this._ipcCall('focusWindow');
|
||||
this.ipcCall('focusWindow');
|
||||
};
|
||||
|
||||
return notification;
|
||||
@@ -401,7 +399,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
async getAppVersion(): Promise<string> {
|
||||
return this._ipcCall('getAppVersion');
|
||||
return this.ipcCall('getAppVersion');
|
||||
}
|
||||
|
||||
supportsAutoLaunch(): boolean {
|
||||
@@ -409,11 +407,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
async getAutoLaunchEnabled(): Promise<boolean> {
|
||||
return this._ipcCall('getAutoLaunchEnabled');
|
||||
return this.ipcCall('getAutoLaunchEnabled');
|
||||
}
|
||||
|
||||
async setAutoLaunchEnabled(enabled: boolean): Promise<void> {
|
||||
return this._ipcCall('setAutoLaunchEnabled', enabled);
|
||||
return this.ipcCall('setAutoLaunchEnabled', enabled);
|
||||
}
|
||||
|
||||
supportsWarnBeforeExit(): boolean {
|
||||
@@ -421,11 +419,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
async shouldWarnBeforeExit(): Promise<boolean> {
|
||||
return this._ipcCall('shouldWarnBeforeExit');
|
||||
return this.ipcCall('shouldWarnBeforeExit');
|
||||
}
|
||||
|
||||
async setWarnBeforeExit(enabled: boolean): Promise<void> {
|
||||
return this._ipcCall('setWarnBeforeExit', enabled);
|
||||
return this.ipcCall('setWarnBeforeExit', enabled);
|
||||
}
|
||||
|
||||
supportsAutoHideMenuBar(): boolean {
|
||||
@@ -434,11 +432,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
async getAutoHideMenuBarEnabled(): Promise<boolean> {
|
||||
return this._ipcCall('getAutoHideMenuBarEnabled');
|
||||
return this.ipcCall('getAutoHideMenuBarEnabled');
|
||||
}
|
||||
|
||||
async setAutoHideMenuBarEnabled(enabled: boolean): Promise<void> {
|
||||
return this._ipcCall('setAutoHideMenuBarEnabled', enabled);
|
||||
return this.ipcCall('setAutoHideMenuBarEnabled', enabled);
|
||||
}
|
||||
|
||||
supportsMinimizeToTray(): boolean {
|
||||
@@ -447,15 +445,15 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
async getMinimizeToTrayEnabled(): Promise<boolean> {
|
||||
return this._ipcCall('getMinimizeToTrayEnabled');
|
||||
return this.ipcCall('getMinimizeToTrayEnabled');
|
||||
}
|
||||
|
||||
async setMinimizeToTrayEnabled(enabled: boolean): Promise<void> {
|
||||
return this._ipcCall('setMinimizeToTrayEnabled', enabled);
|
||||
return this.ipcCall('setMinimizeToTrayEnabled', enabled);
|
||||
}
|
||||
|
||||
async canSelfUpdate(): Promise<boolean> {
|
||||
const feedUrl = await this._ipcCall('getUpdateFeedUrl');
|
||||
const feedUrl = await this.ipcCall('getUpdateFeedUrl');
|
||||
return Boolean(feedUrl);
|
||||
}
|
||||
|
||||
@@ -494,7 +492,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
window.location.reload(false);
|
||||
}
|
||||
|
||||
async _ipcCall(name: string, ...args: any[]): Promise<any> {
|
||||
private async ipcCall(name: string, ...args: any[]): Promise<any> {
|
||||
const ipcCallId = ++this.nextIpcCallId;
|
||||
return new Promise((resolve, reject) => {
|
||||
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
|
||||
@@ -503,7 +501,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
});
|
||||
}
|
||||
|
||||
_onIpcReply = (ev, payload) => {
|
||||
private onIpcReply = (ev, payload) => {
|
||||
if (payload.id === undefined) {
|
||||
console.warn("Ignoring IPC reply with no ID");
|
||||
return;
|
||||
@@ -528,22 +526,22 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
async setLanguage(preferredLangs: string[]) {
|
||||
return this._ipcCall('setLanguage', preferredLangs);
|
||||
return this.ipcCall('setLanguage', preferredLangs);
|
||||
}
|
||||
|
||||
setSpellCheckLanguages(preferredLangs: string[]) {
|
||||
this._ipcCall('setSpellCheckLanguages', preferredLangs).catch(error => {
|
||||
this.ipcCall('setSpellCheckLanguages', preferredLangs).catch(error => {
|
||||
console.log("Failed to send setSpellCheckLanguages IPC to Electron");
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
async getSpellCheckLanguages(): Promise<string[]> {
|
||||
return this._ipcCall('getSpellCheckLanguages');
|
||||
return this.ipcCall('getSpellCheckLanguages');
|
||||
}
|
||||
|
||||
async getAvailableSpellCheckLanguages(): Promise<string[]> {
|
||||
return this._ipcCall('getAvailableSpellCheckLanguages');
|
||||
return this.ipcCall('getAvailableSpellCheckLanguages');
|
||||
}
|
||||
|
||||
getSSOCallbackUrl(fragmentAfterLogin: string): URL {
|
||||
@@ -563,7 +561,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
private navigateForwardBack(back: boolean) {
|
||||
this._ipcCall(back ? "navigateBack" : "navigateForward");
|
||||
this.ipcCall(back ? "navigateBack" : "navigateForward");
|
||||
}
|
||||
private navigateToSpace(num: number) {
|
||||
dis.dispatch<SwitchSpacePayload>({
|
||||
@@ -591,22 +589,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "1":
|
||||
case "2":
|
||||
case "3":
|
||||
case "4":
|
||||
case "5":
|
||||
case "6":
|
||||
case "7":
|
||||
case "8":
|
||||
case "9":
|
||||
case "0":
|
||||
if (SettingsStore.getValue("feature_spaces") && isOnlyCtrlOrCmdKeyEvent(ev)) {
|
||||
this.navigateToSpace(parseInt(ev.key, 10));
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
if (!handled &&
|
||||
// ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform
|
||||
// breaks skinning as the platform is instantiated prior to the skin being loaded
|
||||
SettingsStore.getValue("feature_spaces") &&
|
||||
ev.code.startsWith("Digit") &&
|
||||
isOnlyCtrlOrCmdKeyEvent(ev)
|
||||
) {
|
||||
const spaceNumber = ev.code.slice(5); // Cut off the first 5 characters - "Digit"
|
||||
this.navigateToSpace(parseInt(spaceNumber, 10));
|
||||
handled = true;
|
||||
}
|
||||
|
||||
return handled;
|
||||
@@ -614,7 +608,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
|
||||
async getPickleKey(userId: string, deviceId: string): Promise<string | null> {
|
||||
try {
|
||||
return await this._ipcCall('getPickleKey', userId, deviceId);
|
||||
return await this.ipcCall('getPickleKey', userId, deviceId);
|
||||
} catch (e) {
|
||||
// if we can't connect to the password storage, assume there's no
|
||||
// pickle key
|
||||
@@ -624,7 +618,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
|
||||
async createPickleKey(userId: string, deviceId: string): Promise<string | null> {
|
||||
try {
|
||||
return await this._ipcCall('createPickleKey', userId, deviceId);
|
||||
return await this.ipcCall('createPickleKey', userId, deviceId);
|
||||
} catch (e) {
|
||||
// if we can't connect to the password storage, assume there's no
|
||||
// pickle key
|
||||
@@ -634,7 +628,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
|
||||
async destroyPickleKey(userId: string, deviceId: string): Promise<void> {
|
||||
try {
|
||||
await this._ipcCall('destroyPickleKey', userId, deviceId);
|
||||
await this.ipcCall('destroyPickleKey', userId, deviceId);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export default abstract class VectorBasePlatform extends BasePlatform {
|
||||
return this._favicon = new Favicon();
|
||||
}
|
||||
|
||||
_updateFavicon() {
|
||||
private updateFavicon() {
|
||||
let bgColor = "#d00";
|
||||
let notif: string | number = this.notificationCount;
|
||||
|
||||
@@ -64,13 +64,13 @@ export default abstract class VectorBasePlatform extends BasePlatform {
|
||||
setNotificationCount(count: number) {
|
||||
if (this.notificationCount === count) return;
|
||||
super.setNotificationCount(count);
|
||||
this._updateFavicon();
|
||||
this.updateFavicon();
|
||||
}
|
||||
|
||||
setErrorStatus(errorDidOccur: boolean) {
|
||||
if (this.errorDidOccur === errorDidOccur) return;
|
||||
super.setErrorStatus(errorDidOccur);
|
||||
this._updateFavicon();
|
||||
this.updateFavicon();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||
return notification;
|
||||
}
|
||||
|
||||
_getVersion(): Promise<string> {
|
||||
private getVersion(): Promise<string> {
|
||||
// We add a cachebuster to the request to make sure that we know about
|
||||
// the most recent version on the origin server. That might not
|
||||
// actually be the version we'd get on a reload (particularly in the
|
||||
@@ -132,7 +132,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||
if (this.runningVersion !== null) {
|
||||
return Promise.resolve(this.runningVersion);
|
||||
}
|
||||
return this._getVersion();
|
||||
return this.getVersion();
|
||||
}
|
||||
|
||||
startUpdater() {
|
||||
@@ -145,7 +145,7 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||
}
|
||||
|
||||
pollForUpdate = () => {
|
||||
return this._getVersion().then((ver) => {
|
||||
return this.getVersion().then((ver) => {
|
||||
if (this.runningVersion === null) {
|
||||
this.runningVersion = ver;
|
||||
} else if (this.runningVersion !== ver) {
|
||||
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import * as qs from 'querystring';
|
||||
import { QueryDict, decodeParams } from "matrix-js-sdk/src/utils";
|
||||
|
||||
// We want to support some name / value pairs in the fragment
|
||||
// so we're re-using query string like format
|
||||
@@ -32,15 +32,15 @@ export function parseQsFromFragment(location: Location) {
|
||||
|
||||
const result = {
|
||||
location: decodeURIComponent(hashparts[0]),
|
||||
params: <qs.ParsedUrlQuery>{},
|
||||
params: <QueryDict>{},
|
||||
};
|
||||
|
||||
if (hashparts.length > 1) {
|
||||
result.params = qs.parse(hashparts[1]);
|
||||
result.params = decodeParams(hashparts[1]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function parseQs(location: Location) {
|
||||
return qs.parse(location.search.substring(1));
|
||||
export function parseQs(location: Location): QueryDict {
|
||||
return decodeParams(location.search.substring(1));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright 2020 New Vector Ltd
|
||||
|
||||
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 { parseQsFromFragment, parseQs } from "../../src/vector/url_utils";
|
||||
|
||||
describe("url_utils.ts", function() {
|
||||
// @ts-ignore
|
||||
const location: Location = {
|
||||
hash: "",
|
||||
search: "",
|
||||
};
|
||||
|
||||
it("parseQsFromFragment", function() {
|
||||
location.hash = "/home?foo=bar";
|
||||
expect(parseQsFromFragment(location)).toEqual({
|
||||
location: "home",
|
||||
params: {
|
||||
"foo": "bar",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
describe("parseQs", function() {
|
||||
location.search = "?foo=bar";
|
||||
expect(parseQs(location)).toEqual({
|
||||
"foo": "bar",
|
||||
});
|
||||
});
|
||||
|
||||
describe("parseQs with arrays", function() {
|
||||
location.search = "?via=s1&via=s2&via=s2&foo=bar";
|
||||
expect(parseQs(location)).toEqual({
|
||||
"via": ["s1", "s2", "s2"],
|
||||
"foo": "bar",
|
||||
});
|
||||
});
|
||||
});
|
||||
+5
-2
@@ -55,11 +55,10 @@ module.exports = (env, argv) => {
|
||||
|
||||
entry: {
|
||||
"bundle": "./src/vector/index.ts",
|
||||
"indexeddb-worker": "./src/vector/indexeddb-worker.ts",
|
||||
"mobileguide": "./src/vector/mobile_guide/index.ts",
|
||||
"jitsi": "./src/vector/jitsi/index.ts",
|
||||
"usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js",
|
||||
"recorder-worklet": "./node_modules/matrix-react-sdk/src/voice/RecorderWorklet.ts",
|
||||
"recorder-worklet": "./node_modules/matrix-react-sdk/src/audio/RecorderWorklet.ts",
|
||||
|
||||
// CSS themes
|
||||
"theme-legacy": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss",
|
||||
@@ -151,6 +150,10 @@ module.exports = (env, argv) => {
|
||||
/olm[\\/](javascript[\\/])?olm\.js$/,
|
||||
],
|
||||
rules: [
|
||||
{
|
||||
test: /\.worker\.ts$/,
|
||||
loader: "worker-loader",
|
||||
},
|
||||
{
|
||||
test: /\.(ts|js)x?$/,
|
||||
include: (f) => {
|
||||
|
||||
Reference in New Issue
Block a user