mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge remote-tracking branch 'upstream/master' into sc
This commit is contained in:
commit
f008fecccf
37
.eslintrc.js
37
.eslintrc.js
@ -1,23 +1,30 @@
|
||||
module.exports = {
|
||||
"extends": ["matrix-org", "matrix-org/react"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
plugins: ["matrix-org"],
|
||||
extends: [
|
||||
"plugin:matrix-org/babel",
|
||||
"plugin:matrix-org/react",
|
||||
],
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
},
|
||||
"rules": {
|
||||
rules: {
|
||||
// Things we do that break the ideal style
|
||||
"quotes": "off",
|
||||
},
|
||||
"overrides": [{
|
||||
"files": ["src/**/*.{ts,tsx}"],
|
||||
"extends": ["matrix-org/ts", "matrix-org/react"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
},
|
||||
"rules": {
|
||||
"quotes": "off",
|
||||
// While converting to ts we allow this
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
overrides: [{
|
||||
files: ["src/**/*.{ts,tsx}"],
|
||||
extends: [
|
||||
"plugin:matrix-org/typescript",
|
||||
"plugin:matrix-org/react",
|
||||
],
|
||||
rules: {
|
||||
// Things we do that break the ideal style
|
||||
"prefer-promise-reject-errors": "off",
|
||||
"quotes": "off",
|
||||
|
||||
// We disable this while we're transitioning
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
},
|
||||
}],
|
||||
};
|
||||
|
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@ -12,11 +12,11 @@ that aren't relevant to your particular case.
|
||||
Text between <!-- and --> marks will be invisible in the report.
|
||||
-->
|
||||
|
||||
### Description
|
||||
#### Description
|
||||
|
||||
Describe here the problem that you are experiencing, or the feature you are requesting.
|
||||
|
||||
### Steps to reproduce
|
||||
#### Steps to reproduce
|
||||
|
||||
- For bugs, list the steps
|
||||
- that reproduce the bug
|
||||
@ -30,7 +30,7 @@ file a bug here too! -->
|
||||
|
||||
<!-- Include screenshots if possible: you can drag and drop images below. -->
|
||||
|
||||
### Version information
|
||||
#### Version information
|
||||
|
||||
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->
|
||||
|
||||
|
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -21,11 +21,11 @@ that aren't relevant to your particular case.
|
||||
Text between <!-- and --> marks will be invisible in the report.
|
||||
-->
|
||||
|
||||
### Description
|
||||
#### Description
|
||||
|
||||
Describe here the problem that you are experiencing, or the feature you are requesting.
|
||||
|
||||
### Steps to reproduce
|
||||
#### Steps to reproduce
|
||||
|
||||
- For bugs, list the steps
|
||||
- that reproduce the bug
|
||||
@ -40,7 +40,7 @@ Logs being sent: yes/no
|
||||
|
||||
<!-- Include screenshots if possible: you can drag and drop images below. -->
|
||||
|
||||
### Version information
|
||||
#### Version information
|
||||
|
||||
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->
|
||||
|
||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,3 +1,3 @@
|
||||
<!-- Please read CONTRIBUTING.md before submitting your pull request -->
|
||||
<!-- Please read https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst 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 -->
|
||||
<!-- Include a Sign-Off as described in https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst#sign-off -->
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,3 +20,5 @@ electron/pub
|
||||
/.tmp
|
||||
/webpack-stats.json
|
||||
/src/component-index.js.tmp
|
||||
.vscode
|
||||
.vscode/
|
||||
|
@ -1,9 +1,6 @@
|
||||
{
|
||||
"minify": true,
|
||||
"classPrefix": "modernizr_",
|
||||
"options": [
|
||||
"setClasses"
|
||||
],
|
||||
"enableClasses": false,
|
||||
"feature-detects": [
|
||||
"test/css/animations",
|
||||
"test/css/displaytable",
|
||||
|
45
CHANGELOG.md
45
CHANGELOG.md
@ -1,3 +1,48 @@
|
||||
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)
|
||||
|
||||
* No changes from rc.1
|
||||
|
||||
Changes in [1.7.33-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.33-rc.1) (2021-07-14)
|
||||
=========================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.32...v1.7.33-rc.1)
|
||||
|
||||
* Translations update from Weblate
|
||||
[\#17991](https://github.com/vector-im/element-web/pull/17991)
|
||||
* Revert "Don't run nginx as root in docker"
|
||||
[\#17990](https://github.com/vector-im/element-web/pull/17990)
|
||||
* Don't run nginx as root in docker
|
||||
[\#17927](https://github.com/vector-im/element-web/pull/17927)
|
||||
* Add VS Code to gitignore
|
||||
[\#17982](https://github.com/vector-im/element-web/pull/17982)
|
||||
* Remove canvas native dependencies from Dockerfile
|
||||
[\#17973](https://github.com/vector-im/element-web/pull/17973)
|
||||
* Remove node-canvas devDependency
|
||||
[\#17967](https://github.com/vector-im/element-web/pull/17967)
|
||||
* Add `reskindex` to development steps
|
||||
[\#17926](https://github.com/vector-im/element-web/pull/17926)
|
||||
* Update Modernizr and stop it from polluting classes on the html tag
|
||||
[\#17921](https://github.com/vector-im/element-web/pull/17921)
|
||||
* Convert a few files to TS
|
||||
[\#17895](https://github.com/vector-im/element-web/pull/17895)
|
||||
* Do not generate a lockfile when running in CI
|
||||
[\#17902](https://github.com/vector-im/element-web/pull/17902)
|
||||
* Fix lockfile to match listed dependencies
|
||||
[\#17888](https://github.com/vector-im/element-web/pull/17888)
|
||||
* Remove PostCSS calc() processing
|
||||
[\#17856](https://github.com/vector-im/element-web/pull/17856)
|
||||
* Make issue template styling more consistent and improve PR template
|
||||
[\#17691](https://github.com/vector-im/element-web/pull/17691)
|
||||
* Update jsrsasign to ^10.2.0 (Includes fix for CVE-2021-30246)
|
||||
[\#17170](https://github.com/vector-im/element-web/pull/17170)
|
||||
* Migrate to `eslint-plugin-matrix-org`
|
||||
[\#17847](https://github.com/vector-im/element-web/pull/17847)
|
||||
* Remove spurious overflow: auto on #matrixchat element
|
||||
[\#17647](https://github.com/vector-im/element-web/pull/17647)
|
||||
* Enhance security by disallowing CSP object-src rule
|
||||
[\#17818](https://github.com/vector-im/element-web/pull/17818)
|
||||
|
||||
Changes in [1.7.32](https://github.com/vector-im/element-web/releases/tag/v1.7.32) (2021-07-05)
|
||||
===============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/element-web/compare/v1.7.32-rc.1...v1.7.32)
|
||||
|
@ -9,10 +9,7 @@ ARG REACT_SDK_BRANCH="master"
|
||||
ARG JS_SDK_REPO="https://github.com/SchildiChat/matrix-js-sdk.git"
|
||||
ARG JS_SDK_BRANCH="master"
|
||||
|
||||
RUN apt-get update && apt-get install -y git dos2unix \
|
||||
# These packages are required for building Canvas on architectures like Arm
|
||||
# See https://www.npmjs.com/package/canvas#compiling
|
||||
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
|
||||
RUN apt-get update && apt-get install -y git dos2unix
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
|
@ -301,6 +301,7 @@ cd element-web
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-react-sdk
|
||||
yarn install
|
||||
yarn reskindex
|
||||
yarn start
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,6 @@ module.exports = {
|
||||
],
|
||||
}],
|
||||
"@babel/preset-typescript",
|
||||
"@babel/preset-flow",
|
||||
"@babel/preset-react",
|
||||
],
|
||||
"plugins": [
|
||||
@ -21,7 +20,6 @@ module.exports = {
|
||||
"@babel/plugin-proposal-object-rest-spread",
|
||||
"@babel/plugin-proposal-optional-chaining",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||
"@babel/plugin-transform-flow-comments",
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
"@babel/plugin-transform-runtime",
|
||||
],
|
||||
|
27
package.json
27
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "schildichat-web",
|
||||
"version": "1.7.32-sc1",
|
||||
"version": "1.7.33-sc1",
|
||||
"description": "A Matrix client based on Element with a more traditional instant messaging experience",
|
||||
"author": "SchildiChat",
|
||||
"repository": {
|
||||
@ -58,10 +58,10 @@
|
||||
"browser-request": "^0.3.3",
|
||||
"gfm.css": "^1.1.2",
|
||||
"highlight.js": "^10.5.0",
|
||||
"jsrsasign": "^10.1.5",
|
||||
"jsrsasign": "^10.2.0",
|
||||
"katex": "^0.12.0",
|
||||
"matrix-js-sdk": "12.0.1",
|
||||
"matrix-react-sdk": "3.25.0",
|
||||
"matrix-js-sdk": "12.1.0",
|
||||
"matrix-react-sdk": "3.26.0",
|
||||
"matrix-widget-api": "^0.1.0-beta.15",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^17.0.2",
|
||||
@ -71,6 +71,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/eslint-parser": "^7.12.10",
|
||||
"@babel/eslint-plugin": "^7.12.10",
|
||||
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
||||
"@babel/plugin-proposal-decorators": "^7.12.12",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.12.1",
|
||||
@ -79,10 +81,8 @@
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-flow-comments": "^7.12.1",
|
||||
"@babel/plugin-transform-runtime": "^7.12.10",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-flow": "^7.12.1",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@babel/preset-typescript": "^7.12.7",
|
||||
"@babel/register": "^7.12.10",
|
||||
@ -94,19 +94,18 @@
|
||||
"@types/react": "^17.0.2",
|
||||
"@types/react-dom": "^17.0.2",
|
||||
"@types/sanitize-html": "^2.3.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.17.0",
|
||||
"@typescript-eslint/parser": "^4.17.0",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^26.6.3",
|
||||
"babel-loader": "^8.2.2",
|
||||
"canvas": "^2.6.1",
|
||||
"chokidar": "^3.5.1",
|
||||
"concurrently": "^5.3.0",
|
||||
"cpx": "^1.5.0",
|
||||
"css-loader": "^3.6.0",
|
||||
"eslint": "7.18.0",
|
||||
"eslint-config-matrix-org": "^0.2.0",
|
||||
"eslint-plugin-babel": "^5.3.1",
|
||||
"eslint-plugin-flowtype": "^5.2.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-plugin-matrix-org": "github:matrix-org/eslint-plugin-matrix-org#main",
|
||||
"eslint-plugin-react": "^7.22.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
@ -124,10 +123,9 @@
|
||||
"mini-css-extract-plugin": "^0.12.0",
|
||||
"minimist": "^1.2.5",
|
||||
"mkdirp": "^1.0.4",
|
||||
"modernizr": "^3.11.4",
|
||||
"modernizr": "^3.11.7",
|
||||
"node-fetch": "^2.6.1",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.4",
|
||||
"postcss-calc": "^7.0.5",
|
||||
"postcss-easings": "^2.0.0",
|
||||
"postcss-extend": "^1.0.5",
|
||||
"postcss-hexrgba": "^2.0.1",
|
||||
@ -169,7 +167,8 @@
|
||||
"decoderWorker\\.min\\.js": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
|
||||
"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"
|
||||
"context-filter-polyfill": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/empty.js",
|
||||
"FontManager.ts": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/FontManager.js"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"/node_modules/(?!matrix-js-sdk).+$",
|
||||
|
@ -76,7 +76,7 @@ dodep matrix-org matrix-js-sdk
|
||||
|
||||
pushd matrix-js-sdk
|
||||
yarn link
|
||||
yarn install
|
||||
yarn install --pure-lockfile
|
||||
popd
|
||||
|
||||
yarn link matrix-js-sdk
|
||||
@ -90,7 +90,7 @@ dodep matrix-org matrix-react-sdk
|
||||
pushd matrix-react-sdk
|
||||
yarn link
|
||||
yarn link matrix-js-sdk
|
||||
yarn install
|
||||
yarn install --pure-lockfile
|
||||
yarn reskindex
|
||||
popd
|
||||
|
||||
|
@ -19,7 +19,7 @@ import React from 'react';
|
||||
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
|
||||
|
||||
export default class VectorAuthHeaderLogo extends React.PureComponent {
|
||||
static replaces = 'AuthHeaderLogo'
|
||||
static replaces = 'AuthHeaderLogo';
|
||||
|
||||
render() {
|
||||
const brandingConfig = SdkConfig.get().branding;
|
||||
|
@ -19,7 +19,7 @@ import * as sdk from 'matrix-react-sdk/src/index';
|
||||
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
|
||||
|
||||
export default class VectorAuthPage extends React.PureComponent {
|
||||
static replaces = 'AuthPage'
|
||||
static replaces = 'AuthPage';
|
||||
|
||||
static welcomeBackgroundUrl;
|
||||
|
||||
|
@ -214,7 +214,7 @@ export default class Favicon {
|
||||
if (!this.isReady) {
|
||||
this.readyCb = () => {
|
||||
this.badge(content, opts);
|
||||
}
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
worker-src 'self';
|
||||
frame-src * blob: data:;
|
||||
form-action 'self';
|
||||
object-src 'self';
|
||||
manifest-src 'self';
|
||||
">
|
||||
<% for (var i=0; i < htmlWebpackPlugin.files.css.length; i++) {
|
||||
@ -65,7 +64,7 @@
|
||||
data-vector-recorder-worklet-script="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("recorder-worklet.js")) %>"
|
||||
>
|
||||
<noscript>Sorry, SchildiChat requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
|
||||
<section id="matrixchat" style="height: 100%; overflow: auto;" class="notranslate"></section>
|
||||
<section id="matrixchat" style="height: 100%;" class="notranslate"></section>
|
||||
<script src="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("bundle.js")) %>"></script>
|
||||
|
||||
<!-- Legacy supporting Prefetch images -->
|
||||
|
@ -35,7 +35,6 @@ import {setTheme} from "matrix-react-sdk/src/theme";
|
||||
|
||||
import { initRageshake, initRageshakeStore } from "./rageshakesetup";
|
||||
|
||||
|
||||
export const rageshakePromise = initRageshake();
|
||||
|
||||
export function preparePlatform() {
|
||||
|
@ -1,19 +1,21 @@
|
||||
import { getVectorConfig } from '../getconfig';
|
||||
|
||||
function onBackToElementClick() {
|
||||
function onBackToElementClick(): void {
|
||||
// Cookie should expire in 4 hours
|
||||
document.cookie = 'element_mobile_redirect_to_guide=false;path=/;max-age=14400';
|
||||
window.location.href = '../';
|
||||
}
|
||||
|
||||
// NEVER pass user-controlled content to this function! Hardcoded strings only please.
|
||||
function renderConfigError(message) {
|
||||
function renderConfigError(message: string): void {
|
||||
const contactMsg = "If this is unexpected, please contact your system administrator " +
|
||||
"or technical support representative.";
|
||||
message = `<h2>Error loading Element</h2><p>${message}</p><p>${contactMsg}</p>`;
|
||||
|
||||
const toHide = document.getElementsByClassName("mx_HomePage_container");
|
||||
const errorContainers = document.getElementsByClassName("mx_HomePage_errorContainer");
|
||||
const errorContainers = document.getElementsByClassName(
|
||||
"mx_HomePage_errorContainer",
|
||||
) as HTMLCollectionOf<HTMLDialogElement>;
|
||||
|
||||
for (const e of toHide) {
|
||||
// We have to clear the content because .style.display='none'; doesn't work
|
||||
@ -26,7 +28,7 @@ function renderConfigError(message) {
|
||||
}
|
||||
}
|
||||
|
||||
async function initPage() {
|
||||
async function initPage(): Promise<void> {
|
||||
document.getElementById('back_to_element_button').onclick = onBackToElementClick;
|
||||
|
||||
const config = await getVectorConfig('..');
|
||||
@ -92,7 +94,7 @@ async function initPage() {
|
||||
if (isUrl && !isUrl.endsWith('/')) isUrl += '/';
|
||||
|
||||
if (hsUrl !== 'https://matrix.org/') {
|
||||
document.getElementById('configure_element_button').href =
|
||||
(document.getElementById('configure_element_button') as HTMLAnchorElement).href =
|
||||
"https://mobile.element.io?hs_url=" + encodeURIComponent(hsUrl) +
|
||||
"&is_url=" + encodeURIComponent(isUrl);
|
||||
document.getElementById('step1_heading').innerHTML= '1: Install the app';
|
File diff suppressed because one or more lines are too long
@ -55,8 +55,8 @@ module.exports = (env, argv) => {
|
||||
|
||||
entry: {
|
||||
"bundle": "./src/vector/index.ts",
|
||||
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
|
||||
"mobileguide": "./src/vector/mobile_guide/index.js",
|
||||
"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",
|
||||
@ -251,7 +251,6 @@ module.exports = (env, argv) => {
|
||||
require("postcss-easings")(),
|
||||
require("postcss-strip-inline-comments")(),
|
||||
require("postcss-hexrgba")(),
|
||||
require("postcss-calc")(),
|
||||
|
||||
// It's important that this plugin is last otherwise we end
|
||||
// up with broken CSS.
|
||||
|
Loading…
Reference in New Issue
Block a user