diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index a2042975e1..944c1298f9 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -38,7 +38,7 @@ For the web app: - **Browser**: Chrome, Safari, Firefox? which version? - **OS**: Windows, macOS, Ubuntu, Arch Linux, etc? -- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web? +- **URL**: develop.element.io / app.element.io / somewhere else? If a private server, what version of Element Web? For the desktop app: diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5f472303dd..ffeaf9ad43 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -48,7 +48,7 @@ For the web app: - **Browser**: Chrome, Safari, Firefox? which version? - **OS**: Windows, macOS, Ubuntu, Arch Linux, etc? -- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web? +- **URL**: develop.element.io / app.element.io / somewhere else? If a private server, what version of Element Web? For the desktop app: diff --git a/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md b/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md index b3e68ccec9..4e090d130b 100644 --- a/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md +++ b/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md @@ -50,7 +50,7 @@ For the web app: - **Browser**: Chrome, Safari, Firefox? which version? - **OS**: Windows, macOS, Ubuntu, Arch Linux, etc? -- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web? +- **URL**: develop.element.io / app.element.io / somewhere else? If a private server, what version of Element Web? For the desktop app: diff --git a/CHANGELOG.md b/CHANGELOG.md index 73aeb997f3..6fd8102a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,97 @@ +Changes in [1.7.9](https://github.com/vector-im/element-web/releases/tag/v1.7.9) (2020-10-12) +============================================================================================= +[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.9-rc.1...v1.7.9) + + * Upgrade to React SDK 3.6.0 and JS SDK 8.5.0 + +Changes in [1.7.9-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.9-rc.1) (2020-10-07) +======================================================================================================= +[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.8...v1.7.9-rc.1) + + * Upgrade to React SDK 3.6.0-rc.1 and JS SDK 8.5.0-rc.1 + * Update from Weblate + [\#15406](https://github.com/vector-im/element-web/pull/15406) + * Update Jest and JSDOM + [\#15402](https://github.com/vector-im/element-web/pull/15402) + * Add support for dehydration/fallback keys + [\#15398](https://github.com/vector-im/element-web/pull/15398) + * Remove riot-bot from sample config + [\#15376](https://github.com/vector-im/element-web/pull/15376) + * Switch to using the Widget API SDK for Jitsi widgets + [\#15102](https://github.com/vector-im/element-web/pull/15102) + * Remove workbox + [\#15352](https://github.com/vector-im/element-web/pull/15352) + * Disable workbox when running in webpack dev server, not in dev mode + [\#15345](https://github.com/vector-im/element-web/pull/15345) + * Update Riot -> Element in contribute.json + [\#15326](https://github.com/vector-im/element-web/pull/15326) + * Update Riot -> Element in redeploy.py + [\#15336](https://github.com/vector-im/element-web/pull/15336) + * Update Riot -> Element in docs/feature-flags.md + [\#15325](https://github.com/vector-im/element-web/pull/15325) + * Update Riot -> Element in element.io/README.md + [\#15327](https://github.com/vector-im/element-web/pull/15327) + * Update Riot -> Element in VectorAuthFooter + [\#15328](https://github.com/vector-im/element-web/pull/15328) + * Update Riot -> Element in VectorEmbeddedPage + [\#15329](https://github.com/vector-im/element-web/pull/15329) + * Update Riot -> Element in docs/review.md + [\#15330](https://github.com/vector-im/element-web/pull/15330) + * Update Riot -> Element in welcome.html + [\#15332](https://github.com/vector-im/element-web/pull/15332) + * Update Riot -> Element in issues-burndown.pl + [\#15333](https://github.com/vector-im/element-web/pull/15333) + * Update Riot -> Element in redeploy.py + [\#15334](https://github.com/vector-im/element-web/pull/15334) + * Update Riot -> Element in index.ts + [\#15335](https://github.com/vector-im/element-web/pull/15335) + * Update Riot -> Element Web in issue templates + [\#15324](https://github.com/vector-im/element-web/pull/15324) + * Give the Jitsi widget an icon to help with discovery + [\#15316](https://github.com/vector-im/element-web/pull/15316) + * Jitsi widget wrapper updates for hangup button + [\#15219](https://github.com/vector-im/element-web/pull/15219) + * Tidy up Service Worker, only run Workbox in production + [\#15271](https://github.com/vector-im/element-web/pull/15271) + * Remove conference handler + [\#15274](https://github.com/vector-im/element-web/pull/15274) + * Rebrand the webpack pipeline for Element + [\#15266](https://github.com/vector-im/element-web/pull/15266) + * Replace dummy sw.js with pre-caching and runtime-caching workbox SW + [\#15196](https://github.com/vector-im/element-web/pull/15196) + +Changes in [1.7.8](https://github.com/vector-im/element-web/releases/tag/v1.7.8) (2020-09-28) +============================================================================================= +[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.8-rc.1...v1.7.8) + + * Upgrade to React SDK 3.5.0 and JS SDK 8.4.1 + +Changes in [1.7.8-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.8-rc.1) (2020-09-23) +======================================================================================================= +[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.7...v1.7.8-rc.1) + + * Upgrade to React SDK 3.5.0-rc.1 and JS SDK 8.4.0-rc.1 + * Update from Weblate + [\#15262](https://github.com/vector-im/element-web/pull/15262) + * Upgrade sanitize-html + [\#15260](https://github.com/vector-im/element-web/pull/15260) + * Document config for preferring Secure Backup setup methods + [\#15251](https://github.com/vector-im/element-web/pull/15251) + * Add end-user documentation for UI features + [\#15190](https://github.com/vector-im/element-web/pull/15190) + * Update git checkout instructions + [\#15218](https://github.com/vector-im/element-web/pull/15218) + * If no bug_report_endpoint_url, hide rageshaking from the App + [\#15201](https://github.com/vector-im/element-web/pull/15201) + * Bump node-fetch from 2.6.0 to 2.6.1 + [\#15153](https://github.com/vector-im/element-web/pull/15153) + * Remove references to Travis CI + [\#15137](https://github.com/vector-im/element-web/pull/15137) + * Fix onNewScreen to use replace when going from roomId->roomAlias + [\#15127](https://github.com/vector-im/element-web/pull/15127) + * Enable Estonian in language menu + [\#15136](https://github.com/vector-im/element-web/pull/15136) + Changes in [1.7.7](https://github.com/vector-im/element-web/releases/tag/v1.7.7) (2020-09-14) ============================================================================================= [Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.6...v1.7.7) diff --git a/config.sample.json b/config.sample.json index 52e47f03f1..32bdc7e589 100644 --- a/config.sample.json +++ b/config.sample.json @@ -35,7 +35,6 @@ "matrix.org" ] }, - "welcomeUserId": "@riot-bot:matrix.org", "piwik": { "url": "https://piwik.riot.im/", "whitelistedHSUrls": ["https://matrix.org"], diff --git a/contribute.json b/contribute.json index 0f9ceed38c..0ac40ea378 100644 --- a/contribute.json +++ b/contribute.json @@ -1,13 +1,13 @@ { - "name": "Riot", + "name": "Element", "description": "A glossy Matrix collaboration client for the web.", "repository": { - "url": "https://github.com/vector-im/riot-web", + "url": "https://github.com/vector-im/element-web", "license": "Apache License 2.0" }, "bugs": { - "list": "https://github.com/vector-im/riot-web/issues", - "report": "https://github.com/vector-im/riot-web/issues/new/choose" + "list": "https://github.com/vector-im/element-web/issues", + "report": "https://github.com/vector-im/element-web/issues/new/choose" }, "keywords": [ "chat", diff --git a/docs/customisations.md b/docs/customisations.md new file mode 100644 index 0000000000..2c36b54f9b --- /dev/null +++ b/docs/customisations.md @@ -0,0 +1,34 @@ +# Customisations + +Element Web and the React SDK support "customisation points" that can be used to +easily add custom logic specific to a particular deployment of Element Web. + +An example of this is the [security customisations +module](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/customisations/Security.ts). +This module in the React SDK only defines some empty functions and their types: +it does not do anything by default. + +To make use of these customisation points, you will first need to fork Element +Web so that you can add your own code. Even though the default module is part of +the React SDK, you can still override it from the Element Web layer: + +1. Copy the default customisation module to + `element-web/src/customisations/YourNameSecurity.ts` +2. Edit customisations points and make sure export the ones you actually want to + activate +3. Tweak the Element build process to use the customised module instead of the + default by adding this to end of the `plugins` array in `webpack.config.js`: + +```js +new webpack.NormalModuleReplacementPlugin( + /src\/customisations\/Security.ts/, + path.resolve(__dirname, 'src/customisations/YourNameSecurity.ts'), +), +``` + +If we add more customisation modules in the future, we'll likely improve these +steps to remove the need for build changes like the above. + +By isolating customisations to their own module, this approach should remove the +chance of merge conflicts when updating your fork, and thus simplify ongoing +maintenance. diff --git a/docs/feature-flags.md b/docs/feature-flags.md index 5fb5545fdf..1e7e5cce37 100644 --- a/docs/feature-flags.md +++ b/docs/feature-flags.md @@ -8,7 +8,7 @@ For example, flags make the following things possible: * Extended testing of a feature via labs on develop * Enabling features when ready instead of the first moment the code is released * Testing a feature with a specific set of users (by enabling only on a specific - Riot instance) + Element instance) The size of the feature controlled by a feature flag may vary widely: it could be a large project like reactions or a smaller change to an existing algorithm. @@ -49,7 +49,7 @@ When starting work on a feature, we should create a matching feature flag: ```js SettingsStore.getValue("feature_cats") ``` -3. Document the feature in the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md) +3. Document the feature in the [labs documentation](https://github.com/vector-im/element-web/blob/develop/docs/labs.md) With these steps completed, the feature is disabled by default, but can be enabled on develop and nightly by interested users for testing. @@ -60,9 +60,9 @@ The following lists a few common options. ## Enabling by default on develop and nightly Set the feature to `true` in the -[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json) +[develop](https://github.com/vector-im/element-web/blob/develop/element.io/develop/config.json) and -[nightly](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/nightly/config.json) +[nightly](https://github.com/vector-im/element-desktop/blob/develop/element.io/nightly/config.json) configs: ```json @@ -74,9 +74,9 @@ configs: ## Enabling by default on staging, app, and release Set the feature to `true` in the -[staging / app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json) +[staging / app](https://github.com/vector-im/element-web/blob/develop/element.io/app/config.json) and -[release](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/release/config.json) +[release](https://github.com/vector-im/element-desktop/blob/develop/element.io/release/config.json) configs. **Note:** The above will only enable the feature for https://app.element.io and official Element @@ -90,18 +90,18 @@ Once we're confident that a feature is working well, we should remove or convert If the feature is meant to be turned off/on by the user: 1. Remove `isFeature` from the [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.ts) 2. Change the `default` to `true` (if desired). -3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md) +3. Remove the feature from the [labs documentation](https://github.com/vector-im/element-web/blob/develop/docs/labs.md) 4. Celebrate! 🥳 If the feature is meant to be forced on (non-configurable): 1. Remove the [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.ts) 2. Remove all `getValue` lines that test for the feature. -3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md) +3. Remove the feature from the [labs documentation](https://github.com/vector-im/element-web/blob/develop/docs/labs.md) 4. If applicable, remove the feature state from - [develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json), - [nightly](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/nightly/config.json), - [staging / app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json), + [develop](https://github.com/vector-im/element-web/blob/develop/element.io/develop/config.json), + [nightly](https://github.com/vector-im/element-desktop/blob/develop/element.io/nightly/config.json), + [staging / app](https://github.com/vector-im/element-web/blob/develop/element.io/app/config.json), and - [release](https://github.com/vector-im/riot-desktop/blob/develop/riot.im/release/config.json) + [release](https://github.com/vector-im/element-desktop/blob/develop/element.io/release/config.json) configs 5. Celebrate! 🥳 diff --git a/docs/labs.md b/docs/labs.md index 50f9e589ed..a3130c29af 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -106,3 +106,8 @@ To enable message previews for reactions in DMs, enable `feature_roomlist_previe represent what communities v2 will look/feel like and can/will change without notice. Due to the early stages this feature is in and the requirement for a compatible homeserver, we will not be accepting issues or feedback for this functionality at this time. + +## Dehydrated devices (`feature_dehydration`) + +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). diff --git a/docs/review.md b/docs/review.md index cf3af42b53..16d6c24048 100644 --- a/docs/review.md +++ b/docs/review.md @@ -76,7 +76,7 @@ As it can be difficult to review design work from looking at just the changed files in a PR, authors should be prepared for Design and / or Product teams to request a link to an ad-hoc build of Element (hosted anywhere) that can be used for the review. In the future, we [hope to automate -this](https://github.com/vector-im/riot-web/issues/12624) for every PR. +this](https://github.com/vector-im/element-web/issues/12624) for every PR. Before starting work on a feature, it's best to ensure your plan aligns well with our vision for Element. Please chat with the team in diff --git a/element.io/README b/element.io/README index ee3f1cda8a..140a3fc0c8 100644 --- a/element.io/README +++ b/element.io/README @@ -6,7 +6,7 @@ official element.io distribution, but these files may be useful if you want to inspect the configuration used there. Element Desktop uses a separate config (see -https://github.com/vector-im/riot-desktop/tree/develop/element.io). +https://github.com/vector-im/element-desktop/tree/develop/element.io). Deployment scripts (such as app/deploy.py) are meant to be run on the web server hosting the Element installation. diff --git a/package.json b/package.json index f6faa477c3..8a06b3c582 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "riot-web", "productName": "Riot", - "version": "1.7.7", + "version": "1.7.9", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { @@ -62,7 +62,8 @@ "jsrsasign": "^9.1.5", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", - "olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz", + "matrix-widget-api": "^0.1.0-beta.5", + "olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz", "prop-types": "^15.7.2", "react": "^16.9.0", "react-dom": "^16.9.0", @@ -92,6 +93,7 @@ "@types/node": "^12.12.41", "@types/react": "16.9", "@types/react-dom": "^16.9.4", + "@types/sanitize-html": "^1.23.3", "autoprefixer": "^9.7.3", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", @@ -112,8 +114,8 @@ "file-loader": "^5.0.2", "fs-extra": "^0.30.0", "html-webpack-plugin": "^3.2.0", - "jest": "^24.9.0", - "jest-environment-jsdom-fourteen": "^1.0.1", + "jest": "^26.5.2", + "jest-environment-jsdom-sixteen": "^1.0.3", "json-loader": "^0.5.3", "loader-utils": "^1.2.3", "matrix-mock-request": "^1.2.3", @@ -137,16 +139,16 @@ "postcss-strip-inline-comments": "^0.1.5", "rimraf": "^2.4.3", "shell-escape": "^0.2.0", + "simple-proxy-agent": "^1.1.0", "stylelint": "^12.0.1", "terser-webpack-plugin": "^2.3.0", "typescript": "^3.7.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10", - "webpack-dev-server": "^3.9.0", - "workbox-webpack-plugin": "^5.1.4" + "webpack-dev-server": "^3.9.0" }, "jest": { - "testEnvironment": "jest-environment-jsdom-fourteen", + "testEnvironment": "jest-environment-jsdom-sixteen", "testMatch": [ "/test/**/*-test.js" ], diff --git a/res/sw.js b/res/sw.js new file mode 100644 index 0000000000..dfe665a16f --- /dev/null +++ b/res/sw.js @@ -0,0 +1 @@ +self.addEventListener('fetch', () => {}); diff --git a/res/welcome.html b/res/welcome.html index bca3c66a30..bb3f84fe64 100644 --- a/res/welcome.html +++ b/res/welcome.html @@ -169,7 +169,7 @@ we don't have an account and should hide them. No account == no guest account ei
- +

_t("Welcome to Element")

@@ -185,7 +185,7 @@ we don't have an account and should hide them. No account == no guest account ei
diff --git a/scripts/build-jitsi.js b/scripts/build-jitsi.js index 464ec6ea69..3f2ba29906 100644 --- a/scripts/build-jitsi.js +++ b/scripts/build-jitsi.js @@ -7,6 +7,7 @@ const fs = require("fs"); const path = require("path"); const mkdirp = require("mkdirp"); const fetch = require("node-fetch"); +const ProxyAgent = require("simple-proxy-agent"); console.log("Making webapp directory"); mkdirp.sync("webapp"); @@ -14,7 +15,13 @@ mkdirp.sync("webapp"); // curl -s https://jitsi.riot.im/libs/external_api.min.js > ./webapp/jitsi_external_api.min.js console.log("Downloading Jitsi script"); const fname = path.join("webapp", "jitsi_external_api.min.js"); -fetch("https://jitsi.riot.im/libs/external_api.min.js").then(res => { + +const options = {}; +if (process.env.HTTPS_PROXY) { + options.agent = new ProxyAgent(process.env.HTTPS_PROXY, {tunnel: true}); +} + +fetch("https://jitsi.riot.im/libs/external_api.min.js", options).then(res => { const stream = fs.createWriteStream(fname); return new Promise((resolve, reject) => { res.body.pipe(stream); diff --git a/scripts/copy-res.js b/scripts/copy-res.js index 6c55f3d5dd..ebe1c625ea 100755 --- a/scripts/copy-res.js +++ b/scripts/copy-res.js @@ -61,6 +61,7 @@ const INCLUDE_LANGS = [ // "dest/b/...". const COPY_LIST = [ ["res/manifest.json", "webapp"], + ["res/sw.js", "webapp"], ["res/welcome.html", "webapp"], ["res/welcome/**", "webapp/welcome"], ["res/themes/**", "webapp/themes"], diff --git a/scripts/issues-burndown.pl b/scripts/issues-burndown.pl index 03af5ed7cc..f7cc413e78 100755 --- a/scripts/issues-burndown.pl +++ b/scripts/issues-burndown.pl @@ -18,7 +18,7 @@ my $gh = Net::GitHub->new( login => 'ara4n', pass => read_password("github password: "), ); -$gh->set_default_user_repo('vector-im', 'riot-web'); +$gh->set_default_user_repo('vector-im', 'element-web'); #my @issues = $gh->issue->repos_issues({ state => 'all', milestone => 3 }); my @issues = $gh->issue->repos_issues({ state => 'all' }); diff --git a/scripts/redeploy.py b/scripts/redeploy.py index 064bbfaa29..e5f2cff6be 100755 --- a/scripts/redeploy.py +++ b/scripts/redeploy.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# auto-deploy script for https://riot.im/develop +# auto-deploy script for https://develop.element.io # # Listens for buildkite webhook pokes (https://buildkite.com/docs/apis/webhooks) # When it gets one, downloads the artifact from buildkite @@ -191,7 +191,7 @@ def deploy_tarball(artifact, build_dir): # Download the tarball here as buildkite needs auth to do this # we don't pgp-sign buildkite artifacts, relying on HTTPS and buildkite - # not being evil. If that's not good enough for you, don't use riot.im/develop. + # not being evil. If that's not good enough for you, don't use develop.element.io. resp = requests.get(artifact['download_url'], stream=True, headers=req_headers()) resp.raise_for_status() with open(artifact['filename'], 'wb') as ofp: diff --git a/src/components/structures/VectorEmbeddedPage.js b/src/components/structures/VectorEmbeddedPage.js index bf3e727590..747b91e481 100644 --- a/src/components/structures/VectorEmbeddedPage.js +++ b/src/components/structures/VectorEmbeddedPage.js @@ -28,7 +28,7 @@ export default class VectorEmbeddedPage extends EmbeddedPage { // we're overriding the base component here, for Element-specific tweaks translate(s) { s = sanitizeHtml(_t(s)); - // ugly fix for https://github.com/vector-im/riot-web/issues/4243 + // ugly fix for https://github.com/vector-im/element-web/issues/4243 // eslint-disable-next-line max-len s = s.replace(/\[matrix\]/, 'Matrix'); return s; diff --git a/src/components/views/auth/VectorAuthFooter.js b/src/components/views/auth/VectorAuthFooter.js index 21bba868d6..31a994b3f8 100644 --- a/src/components/views/auth/VectorAuthFooter.js +++ b/src/components/views/auth/VectorAuthFooter.js @@ -24,7 +24,7 @@ const VectorAuthFooter = () => { let links = [ {"text": "Blog", "url": "https://element.io/blog"}, {"text": "Twitter", "url": "https://twitter.com/element_hq"}, - {"text": "GitHub", "url": "https://github.com/vector-im/riot-web"}, + {"text": "GitHub", "url": "https://github.com/vector-im/element-web"}, ]; if (brandingConfig && brandingConfig.authFooterLinks) { diff --git a/src/customisations/README.md b/src/customisations/README.md new file mode 120000 index 0000000000..cacf116604 --- /dev/null +++ b/src/customisations/README.md @@ -0,0 +1 @@ +../../docs/customisations.md \ No newline at end of file diff --git a/src/i18n/strings/ca.json b/src/i18n/strings/ca.json index d4be8f45f3..1e186410e6 100644 --- a/src/i18n/strings/ca.json +++ b/src/i18n/strings/ca.json @@ -10,5 +10,26 @@ "Sign In": "Inicia la sessió", "Invalid configuration: no default server specified.": "Configuració no vàlida: no s'ha especificat cap servidor per defecte.", "Invalid JSON": "JSON no vàlid", - "Go to your browser to complete Sign In": "Aneu al vostre navegador per completar l'inici de sessió" + "Go to your browser to complete Sign In": "Aneu al vostre navegador per completar l'inici de sessió", + "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuració incorrecta: només podeu especificar una de les opcions default_server_config, default_server_name, o default_hs_url.", + "Your Element is misconfigured": "El vostre Element està mal configurat", + "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "El vostre Element conté un JSON incorrecte. Si us plau arregleu el problema i recarregueu la pàgina.", + "The message from the parser is: %(message)s": "El missatge de l'analitzador és: %(message)s", + "Unable to load config file: please refresh the page to try again.": "No he pogut carregar l'arxiu de configuració: si us plau recarregueu la pàgina per provar-ho de nou.", + "Unexpected error preparing the app. See console for details.": "Error inesperat preparant l'app. Vegeu la consola pels detalls.", + "Download Completed": "Descàrrega completada", + "Open": "Obre", + "Open user settings": "Obre configuració d'usuari", + "Previous/next recently visited room or community": "Anterior/Següent sala o comunitat visitada recentment", + "%(brand)s Desktop (%(platformName)s)": "%(brand)s d'escriptori (%(platformName)s)", + "%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)", + "Powered by Matrix": "En funcionament gràcies a Matrix", + "Unsupported browser": "Navegador no suportat", + "Your browser can't run %(brand)s": "El vostre navegador no pot executar %(brand)s", + "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s usa característiques avançades del navegador que el vostre navegador no suporta.", + "Please install Chrome, Firefox, or Safari for the best experience.": "Si us plau instal·leuChrome, Firefox, o Safari per una millor experiència.", + "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.": "Podeu continuar usant el vostre navegador actual, però algunes o totes les característiques podrien no funcionar i l'aspepte de l'aplicació podria mostrar errors.", + "I understand the risks and wish to continue": "Entenc els riscos i voldria continuar", + "Go to element.io": "Vés a element.io", + "Failed to start": "Ha fallat en iniciar-se" } diff --git a/src/i18n/strings/el.json b/src/i18n/strings/el.json index fd08e4705a..af818ddd6d 100644 --- a/src/i18n/strings/el.json +++ b/src/i18n/strings/el.json @@ -14,7 +14,20 @@ "Invalid configuration: no default server specified.": "Μη έγκυρη ρύθμιση παραμέτρων: δεν έχει οριστεί προκαθορισμένος διακομιστής.", "Explore rooms": "Εξερευνήστε δωμάτια", "Open": "Άνοιγμα", - "Go to your browser to complete Sign In": "Επισκεφτείτε τον browser σας για να ολοκληρωθεί η είσοδος", - "Powered by Matrix": "Παρέχεται από το Matrix", - "Please install Chrome, Firefox, or Safari for the best experience.": "Παρακαλούμε εγκαταστήστε Chrome, Firefox, ή Safari για καλύτερη εμπειρία χρήσης." + "Go to your browser to complete Sign In": "Μεταβείτε στο πρόγραμμα περιήγησής σας για να ολοκληρώσετε τη σύνδεση", + "Powered by Matrix": "Με την υποστήριξη του Matrix", + "Please install Chrome, Firefox, or Safari for the best experience.": "Παρακαλούμε εγκαταστήστε Chrome, Firefox, ή Safari για καλύτερη εμπειρία χρήσης.", + "Your Element is misconfigured": "Το Element σας δεν εχει ρυθμιστεί σωστά", + "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Η ρύθμιση του Element περιέχει μη έγκυρο JSON. Διορθώστε το πρόβλημα και φορτώστε ξανά τη σελίδα.", + "Unable to load config file: please refresh the page to try again.": "Δεν είναι δυνατή η φόρτωση του αρχείου config: ανανεώστε τη σελίδα για να δοκιμάσετε ξανά.", + "Download Completed": "Η λήψη ολοκληρώθηκε", + "Open user settings": "Ανοίξτε τις ρυθμίσεις χρήστη", + "Previous/next recently visited room or community": "Προηγούμενο / επόμενο δωμάτιο ή κοινότητα που επισκεφτήκατε πρόσφατα", + "Unsupported browser": "Μη υποστηριζόμενο πρόγραμμα περιήγησης", + "Your browser can't run %(brand)s": "Το πρόγραμμα περιήγησής σας δεν μπορεί να εκτελέσει %(brand)s", + "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s χρησιμοποιεί προηγμένες δυνατότητες προγράμματος περιήγησης που δεν υποστηρίζονται από το τρέχον πρόγραμμα περιήγησής σας.", + "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.": "Μπορείτε να συνεχίσετε να χρησιμοποιείτε το τρέχον πρόγραμμα περιήγησής σας, αλλά ορισμένες ή όλες οι λειτουργίες ενδέχεται να μην λειτουργούν και η εμφάνιση και η αίσθηση της εφαρμογής ενδέχεται να είναι λανθασμένη.", + "I understand the risks and wish to continue": "Κατανοώ τους κινδύνους και επιθυμώ να συνεχίσω", + "Go to element.io": "Πήγαινε στο element.io", + "Failed to start": "Αποτυχία έναρξης" } diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 89b796ab82..c5096b390e 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -32,5 +32,5 @@ "Open": "打开", "Your browser can't run %(brand)s": "浏览器无法运行%(brand)s", "%(brand)s uses advanced browser features which aren't supported by your current browser.": "当前浏览器不支持%(brand)s调用的高级浏览器特性。", - "Powered by Matrix": "Powered by Matrix" + "Powered by Matrix": "由 Matrix 驱动" } diff --git a/src/vector/dummy_widget/index.ts b/src/vector/dummy_widget/index.ts index 69ac832f1f..3f9025bd67 100644 --- a/src/vector/dummy_widget/index.ts +++ b/src/vector/dummy_widget/index.ts @@ -18,7 +18,7 @@ limitations under the License. require("./index.scss"); import * as qs from 'querystring'; -import {ButtonKind, KnownWidgetActions, WidgetApi} from 'matrix-react-sdk/src/widgets/WidgetApi'; +import {ModalButtonKind, WidgetApi, WidgetApiToWidgetAction} from 'matrix-widget-api'; let widgetApi: WidgetApi; (async function() { @@ -35,20 +35,23 @@ let widgetApi: WidgetApi; }; // Set this up as early as possible because Element will be hitting it almost immediately. - widgetApi = new WidgetApi(qsParam('parentUrl'), qsParam('widgetId'), []); + const parentOrigin = new URL(qsParam('parentUrl')).origin; + widgetApi = new WidgetApi(qsParam("widgetId"), parentOrigin); - widgetApi.on(KnownWidgetActions.CloseModalWidget, req => { - document.getElementById("answer").innerText = "Response from Modal: " + JSON.stringify(req.data); + widgetApi.addEventListener(WidgetApiToWidgetAction.CloseModalWidget, (req: CustomEvent) => { + document.getElementById("answer").innerText = "Response from Modal: " + JSON.stringify(req.detail); }); + widgetApi.start(); + document.getElementById("demoBtn").onclick = () => { const url = new URL(window.location.href); url.pathname = url.pathname.substr(0, url.pathname.lastIndexOf("/")) + "/theme_widget.html"; url.search = ""; widgetApi.openModalWidget(url.toString(), "Test Modal Widget", [ - {id: "m.close", kind: ButtonKind.Danger, label: "Danger"}, - {id: "org.secondary", kind: ButtonKind.Secondary, label: "Secondary"}, - {id: "org.primary", kind: ButtonKind.Primary, label: "Primary"}, + {id: "m.close", kind: ModalButtonKind.Danger, label: "Danger"}, + {id: "org.secondary", kind: ModalButtonKind.Secondary, label: "Secondary"}, + {id: "org.primary", kind: ModalButtonKind.Primary, label: "Primary"}, ], {question: "Answer to everything?"}); }; } catch (e) { diff --git a/src/vector/index.html b/src/vector/index.html index 3ddc8482fb..4cda4b37a5 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -55,6 +55,16 @@
+ + + + + + + + + +