Compare commits

..

33 Commits

Author SHA1 Message Date
RiotRobot
0bc5a01228 v1.7.25 2021-04-12 15:29:40 +01:00
RiotRobot
95fb11a2b9 Prepare changelog for v1.7.25 2021-04-12 15:29:40 +01:00
RiotRobot
19748762a5 Upgrade matrix-react-sdk to 3.18.0 2021-04-12 15:27:10 +01:00
RiotRobot
d1d6ef55ff Upgrade matrix-js-sdk to 9.11.0 2021-04-12 15:26:37 +01:00
RiotRobot
11ce4fa41b v1.7.25-rc.1 2021-04-07 13:11:55 +01:00
RiotRobot
74b4c91d58 Prepare changelog for v1.7.25-rc.1 2021-04-07 13:11:54 +01:00
RiotRobot
c7d34ae926 Upgrade matrix-react-sdk to 3.18.0-rc.1 2021-04-07 13:09:19 +01:00
RiotRobot
9400bd1fd2 Upgrade matrix-js-sdk to 9.11.0-rc.1 2021-04-07 13:07:02 +01:00
J. Ryan Stinnett
e7301ffd74 Merge pull request #16882 from RiotTranslateBot/weblate-element-web-element-web
Translations update from Weblate
2021-04-07 12:44:56 +01:00
Weblate
43bc270284 Merge branch 'origin/develop' into Weblate. 2021-04-07 11:42:17 +00:00
Hakim Oubouali
46082f63b3 Translated using Weblate (Central Atlas Tamazight)
Currently translated at 39.3% (13 of 33 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/tzm/
2021-04-05 01:34:17 +00:00
Travis Ralston
3f0f077ced Merge pull request #16838 from vector-im/revert-16698-gzip-static
Revert "Docker image: serve pre-compressed assets using gzip_static"
2021-04-01 07:26:03 -06:00
Travis Ralston
dfa70b0637 Revert "Docker image: serve pre-compressed assets using gzip_static" 2021-03-31 17:59:39 -06:00
Germain
184efbbc44 Merge pull request #16814 from vector-im/gsouquet-docs 2021-03-31 12:51:40 +01:00
Germain
a9db513352 Update docs/native-node-modules.md
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
2021-03-29 18:07:45 +01:00
Germain Souquet
1ea1d29d3e Move native node modules documentation to element-desktop 2021-03-29 15:59:21 +01:00
RiotRobot
ff74d3ce13 Reset matrix-react-sdk back to develop branch 2021-03-29 13:45:49 +01:00
RiotRobot
75f840a214 Reset matrix-js-sdk back to develop branch 2021-03-29 13:45:37 +01:00
RiotRobot
fd85d3f33d Merge branch 'master' into develop 2021-03-29 13:45:26 +01:00
Germain
47486e84dd Merge pull request #16781 from vector-im/gsouquet-warn-before-exit
Add user settings for warn before exit
2021-03-29 12:07:59 +01:00
RainSlide
83ebda350a Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (33 of 33 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hans/
2021-03-29 09:17:03 +00:00
RainSlide
6fa5591cfe Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (33 of 33 strings)

Translation: Element Web/element-web
Translate-URL: https://translate.element.io/projects/element-web/element-web/zh_Hans/
2021-03-26 11:34:14 +00:00
Travis Ralston
a2074cbc02 Merge pull request #16768 from ShadowJonathan/patch-1
Change ISSUE_TEMPLATE bold lines to proper headers
2021-03-25 09:01:11 -06:00
Germain Souquet
1d79f97a7a Add user settings for warn before exit 2021-03-25 14:15:34 +00:00
J. Ryan Stinnett
57d5206592 Merge pull request #16447 from nielsbasjes/AddK8sExampleConfig
Add example for deployment into Kubernetes
2021-03-25 13:18:14 +00:00
J. Ryan Stinnett
912e7c9f68 Merge pull request #16770 from ShadowJonathan/patch-2
Create bare-bones `PULL_REQUEST_TEMPLATE.md`
2021-03-25 13:13:55 +00:00
Jonathan de Jong
9e15000ea1 Create PULL_REQUEST_TEMPLATE.md 2021-03-24 17:00:59 +01:00
Travis Ralston
6201c3a3f5 Merge pull request #16705 from vector-im/travis/voice-messages/exp
Add webpack config and labs flag docs for voice messages
2021-03-24 09:56:39 -06:00
Jonathan de Jong
88bf562150 Update suggestion-or-feature-request.md 2021-03-24 16:53:08 +01:00
Travis Ralston
4eb7c1bc00 Add docs for where the worker comes from 2021-03-23 18:29:26 -06:00
Niels Basjes
281236432a Provide documentation on how to run on Kubernetes 2021-03-23 11:55:11 +01:00
Travis Ralston
146ed151dd Add docs for labs flag 2021-03-16 23:24:26 -06:00
Travis Ralston
cd2dda268f Add webpack config for opus-recorder worker 2021-03-16 22:58:50 -06:00
14 changed files with 287 additions and 86 deletions

View File

@@ -7,14 +7,14 @@ assignees: ''
---
**Is your suggestion related to a problem? Please describe.**
#### Is your suggestion related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
#### Describe the solution you'd like.
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
#### Describe alternatives you've considered.
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
#### Additional context
Add any other context or screenshots about the feature request here.

3
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,3 @@
<!-- Please read CONTRIBUTING.md before submitting your pull request -->
<!-- Include a Sign-Off at the end of your Pull Request (as described in CONTRIBUTING.md), or on every commit -->

View File

@@ -1,3 +1,31 @@
Changes in [1.7.25](https://github.com/vector-im/element-web/releases/tag/v1.7.25) (2021-04-12)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.25-rc.1...v1.7.25)
* Upgrade to React SDK 3.18.0 and JS SDK 9.11.0
Changes in [1.7.25-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.25-rc.1) (2021-04-07)
=========================================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.24...v1.7.25-rc.1)
* Upgrade to React SDK 3.18.0-rc.1 and JS SDK 9.11.0-rc.1
* Translations update from Weblate
[\#16882](https://github.com/vector-im/element-web/pull/16882)
* Revert "Docker image: serve pre-compressed assets using gzip_static"
[\#16838](https://github.com/vector-im/element-web/pull/16838)
* Move native node modules documentation to element-desktop
[\#16814](https://github.com/vector-im/element-web/pull/16814)
* Add user settings for warn before exit
[\#16781](https://github.com/vector-im/element-web/pull/16781)
* Change ISSUE_TEMPLATE bold lines to proper headers
[\#16768](https://github.com/vector-im/element-web/pull/16768)
* Add example for deployment into Kubernetes
[\#16447](https://github.com/vector-im/element-web/pull/16447)
* Create bare-bones `PULL_REQUEST_TEMPLATE.md`
[\#16770](https://github.com/vector-im/element-web/pull/16770)
* Add webpack config and labs flag docs for voice messages
[\#16705](https://github.com/vector-im/element-web/pull/16705)
Changes in [1.7.24](https://github.com/vector-im/element-web/releases/tag/v1.7.24) (2021-03-29)
===============================================================================================
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.24-rc.1...v1.7.24)

View File

@@ -27,11 +27,6 @@ RUN cp /src/config.sample.json /src/webapp/config.json
# Ensure we populate the version file
RUN dos2unix /src/scripts/docker-write-version.sh && bash /src/scripts/docker-write-version.sh
# Pre-compress for gzip_static
RUN find /src/webapp -type f \
\( -iname '*.css' -o -iname '*.js' -o -iname '*.json' -o -iname '*.html' \
-o -iname '*.svg' -o -iname '*.ttf' -o -iname '*.wasm' \) \
-exec gzip -9 -k {} \; -exec touch -r {} {}.gz \;
# App
FROM nginx:alpine
@@ -39,8 +34,7 @@ FROM nginx:alpine
COPY --from=builder /src/webapp /app
# Insert wasm type into Nginx mime.types file so they load correctly.
RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types \
&& sed -i '2i\ gzip_static on\;' /etc/nginx/conf.d/default.conf
RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types
RUN rm -rf /usr/share/nginx/html \
&& ln -s /app /usr/share/nginx/html

View File

@@ -202,6 +202,12 @@ docker build -t \
.
```
Running in Kubernetes
=====================
The provided element-web docker image can also be run from within a Kubernetes cluster.
See the [Kubernetes example](docs/kubernetes.md) for more details.
config.json
===========
@@ -298,8 +304,8 @@ yarn start
Wait a few seconds for the initial build to finish; you should see something like:
```
[element-js] <s> [webpack.Progress] 100%
[element-js]
[element-js] <s> [webpack.Progress] 100%
[element-js]
[element-js] 「wdm」: 1840 modules
[element-js] 「wdm」: Compiled successfully.
```

189
docs/kubernetes.md Normal file
View File

@@ -0,0 +1,189 @@
Running in Kubernetes
=====================
In case you would like to deploy element-web in a kubernetes cluster you can use
the provided Kubernetes example below as a starting point. Note that this example assumes the
Nginx ingress to be installed.
Note that the content of the required `config.json` is defined inside this yaml because it needs
to be put in your Kubernetes cluster as a `ConfigMap`.
So to use it you must create a file with this content as a starting point and modify it so it meets
the requirements of your environment.
Then you can deploy it to your cluster with something like `kubectl apply -f my-element-web.yaml`.
# This is an example of a POSSIBLE config for deploying a single element-web instance in Kubernetes
# Use the element-web namespace to put it all in.
apiVersion: v1
kind: Namespace
metadata:
name: element-web
---
# The config.json file is to be put into Kubernetes as a config file in such a way that
# the element web instance can read it.
# The code below shows how this can be done with the config.sample.json content.
apiVersion: v1
kind: ConfigMap
metadata:
name: element-config
namespace: element-web
data:
config.json: |
{
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix-client.matrix.org",
"server_name": "matrix.org"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
"brand": "Element",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"defaultCountryCode": "GB",
"showLabsSettings": false,
"features": {
"feature_new_spinner": false
},
"default_federate": true,
"default_theme": "light",
"roomDirectory": {
"servers": [
"matrix.org"
]
},
"piwik": {
"url": "https://piwik.riot.im/",
"whitelistedHSUrls": ["https://matrix.org"],
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
"siteId": 1
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"settingDefaults": {
"breadcrumbs": true
},
"jitsi": {
"preferredDomain": "jitsi.riot.im"
}
}
---
# A deployment of the element-web for a single instance
apiVersion: apps/v1
kind: Deployment
metadata:
name: element
namespace: element-web
spec:
selector:
matchLabels:
app: element
replicas: 1
template:
metadata:
labels:
app: element
spec:
containers:
- name: element
image: vectorim/element-web:latest
volumeMounts:
- name: config-volume
mountPath: /app/config.json
subPath: config.json
ports:
- containerPort: 80
name: element
protocol: TCP
readinessProbe:
httpGet:
path: /
port: element
initialDelaySeconds: 2
periodSeconds: 3
livenessProbe:
httpGet:
path: /
port: element
initialDelaySeconds: 10
periodSeconds: 10
volumes:
- name: config-volume
configMap:
name: element-config
---
# Wrap it all in a Service
apiVersion: v1
kind: Service
metadata:
name: element
namespace: element-web
spec:
selector:
app: element
ports:
- name: default
protocol: TCP
port: 80
targetPort: 80
---
# An ingress definition to expose the service via a hostname
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: element
namespace: element-web
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/configuration-snippet: |
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "frame-ancestors 'none'";
spec:
rules:
- host: element.example.nl
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: element
port:
number: 80
---

View File

@@ -123,3 +123,10 @@ or feedback for this functionality at this time.
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).
## Voice messages (`feature_voice_messages`) [In Development]
An in-progress implementation of [MSC2516](https://github.com/matrix-org/matrix-doc/pull/2516) to add
[voice messages](https://github.com/vector-im/element-web/issues/1358) to Element. Note that this feature
is currently under active development and therefore is entirely incomplete and may not work at all - it
is not recommended for general use at this time.

View File

@@ -1,60 +1,3 @@
# Native Node Modules
For some features, the desktop version of Element can make use of native Node
modules. These allow Riot to integrate with the desktop in ways that a browser
cannot.
While native modules enable powerful new features, they must be complied for
each operating system. For official Element releases, we will always build these
modules from source to ensure we can trust the compiled output. In the future,
we may offer a pre-compiled path for those who want to use these features in a
custom build of Element without installing the various build tools required.
Do note that compiling a module for a particular operating system
(Linux/macOS/Windows) will need to be done on that operating system.
Cross-compiling from a host OS for a different target OS may be possible, but
we don't support this flow with Element dependencies at this time.
At the moment, we need to make some changes to the Element release process before
we can support native Node modules at release time, so these features are
currently disabled by default until that is resolved. The following sections
explain the manual steps you can use with a custom build of Element to enable
these features if you'd like to try them out.
## Adding Seshat for search in E2E encrypted rooms
Seshat is a native Node module that adds support for local event indexing and
full text search in E2E encrypted rooms.
Since Seshat is written in Rust, the Rust compiler and related tools need to be
installed before installing Seshat itself. To install Rust please consult the
official Rust [documentation](https://www.rust-lang.org/tools/install).
Seshat also depends on the SQLCipher library to store its data in encrypted form
on disk. You'll need to install it via your OS package manager.
After installing the Rust compiler and SQLCipher, Seshat support can be added
using yarn inside the `electron_app/` directory:
yarn add matrix-seshat
You will have to rebuild the native libraries against electron's version of
of node rather than your system node, using the `electron-build-env` tool.
This is also needed to when pulling in changes to Seshat using `yarn link`.
Again from the `electron_app/` directory:
yarn add electron-build-env
Recompiling Seshat itself can be done like so:
yarn run electron-build-env -- --electron 6.1.1 -- neon build matrix-seshat --release
Please make sure to include all the `--` as well as the `--release` command line
switch at the end. Modify your electron version accordingly depending on the
version that is installed on your system.
After this is done the Electron version of Element can be run from the main folder
as usual using:
yarn electron
This documentation moved to the [`element-desktop`](https://github.com/vector-im/element-desktop/blob/develop/docs/native-node-modules.md) repository.

View File

@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.7.24",
"version": "1.7.25",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -58,8 +58,8 @@
"highlight.js": "^10.5.0",
"jsrsasign": "^10.1.5",
"katex": "^0.12.0",
"matrix-js-sdk": "9.10.0",
"matrix-react-sdk": "3.17.0",
"matrix-js-sdk": "9.11.0",
"matrix-react-sdk": "3.18.0",
"matrix-widget-api": "^0.1.0-beta.13",
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
"prop-types": "^15.7.2",

View File

@@ -10,5 +10,6 @@
"Unknown device": "Allal arussin",
"Open user settings": "Ṛẓem tisɣal n unessemres",
"Dismiss": "Nexxel",
"Open": "Ṛẓem"
"Open": "Ṛẓem",
"The message from the parser is: %(message)s": "Tuzint seg tasna: %(message)s"
}

View File

@@ -1,12 +1,12 @@
{
"Dismiss": "标记为已读",
"Dismiss": "忽略",
"powered by Matrix": "由 Matrix 驱动",
"Unknown device": "未知设备",
"You need to be using HTTPS to place a screen-sharing call.": "您需要使用 HTTPS 以进行共享屏幕通话。",
"Welcome to Element": "欢迎来到 Element",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "去中心化、加密聊天与协作,由 [matrix] 驱动",
"Sign In": "登录",
"Create Account": "创建账",
"Create Account": "创建账",
"Explore rooms": "探索聊天室",
"The message from the parser is: %(message)s": "语法分析器的信息:%(message)s",
"Invalid JSON": "无效的 JSON",

View File

@@ -399,6 +399,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this._ipcCall('setAutoLaunchEnabled', enabled);
}
supportsWarnBeforeExit(): boolean {
return true;
}
async shouldWarnBeforeExit(): Promise<boolean> {
return this._ipcCall('shouldWarnBeforeExit');
}
async setWarnBeforeExit(enabled: boolean): Promise<void> {
return this._ipcCall('setWarnBeforeExit', enabled);
}
supportsAutoHideMenuBar(): boolean {
// This is irelevant on Mac as Menu bars don't live in the app window
return !isMac;

View File

@@ -252,6 +252,18 @@ module.exports = (env, argv) => {
outputPath: '.',
},
},
{
// Fix up the name of the opus-recorder worker (react-sdk dependency).
// We more or less just want it to be clear it's for opus and not something else.
test: /encoderWorker\.min\.js$/,
loader: "file-loader",
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
options: {
// We deliberately override the name so it makes sense in debugging
name: 'opus-encoderWorker.min.[hash:7].[ext]',
outputPath: '.',
},
},
{
// cache-bust languages.json file placed in
// element-web/webapp/i18n during build by copy-res.js

View File

@@ -7506,10 +7506,10 @@ mathml-tag-names@^2.1.3:
resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3"
integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==
matrix-js-sdk@9.10.0:
version "9.10.0"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.10.0.tgz#ba32981391168778b301c01362a503a8469d3844"
integrity sha512-xvpgvTmCbS8dRTVvVULKbSwyES0y2F17TPukLIIXZMTqqeEBhfycVIjCV6LuACc0WBoRsZbi1/BIlgeWY7J03A==
matrix-js-sdk@9.11.0:
version "9.11.0"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.11.0.tgz#57ba60dfbcf2b32917eb6d7232d0e81cf0de0d3a"
integrity sha512-wP28ybOxyQ7lbC48QddRORYr8atEwbTqDOsu8H6u9jTTgB2qqczI/bkSoXHtutODuSeLY5x0UuwLcxVCy4yxVQ==
dependencies:
"@babel/runtime" "^7.12.5"
another-json "^0.2.0"
@@ -7529,10 +7529,10 @@ matrix-mock-request@^1.2.3:
bluebird "^3.5.0"
expect "^1.20.2"
matrix-react-sdk@3.17.0:
version "3.17.0"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.17.0.tgz#8793c0106f9058af755309c90ee5e3da8ff2a163"
integrity sha512-e8AMlReejmSjt+THys9U4i575MqQ+D4TWi2JfTJ8liS7nqT+Rj2oL4cwA1nRs71kYgPYqknRZIl1mcn7yi0vGQ==
matrix-react-sdk@3.18.0:
version "3.18.0"
resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.18.0.tgz#119b0a908974e46ad9973aa7c4ea10ee06fab2b4"
integrity sha512-RkivwI4Rv+l93tmj3GK1XDK9hGAoIILcQZ+rr1cQ1AymmFSwF/mQLVJICewLZCcp2FP9osJg75/JbmPBaurxdw==
dependencies:
"@babel/runtime" "^7.12.5"
await-lock "^2.1.0"
@@ -7560,9 +7560,10 @@ matrix-react-sdk@3.17.0:
katex "^0.12.0"
linkifyjs "^2.1.9"
lodash "^4.17.20"
matrix-js-sdk "9.10.0"
matrix-js-sdk "9.11.0"
matrix-widget-api "^0.1.0-beta.13"
minimist "^1.2.5"
opus-recorder "^8.0.3"
pako "^2.0.3"
parse5 "^6.0.1"
png-chunks-extract "^1.0.0"
@@ -8470,6 +8471,11 @@ optionator@^0.9.1:
type-check "^0.4.0"
word-wrap "^1.2.3"
opus-recorder@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/opus-recorder/-/opus-recorder-8.0.3.tgz#f7b44f8f68500c9b96a15042a69f915fd9c1716d"
integrity sha512-8vXGiRwlJAavT9D3yYzukNVXQ8vEcKHcsQL/zXO24DQtJ0PLXvoPHNQPJrbMCdB4ypJgWDExvHF4JitQDL7dng==
original@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f"