Merge remote-tracking branch 'upstream/master' into sc

This commit is contained in:
su-ex 2021-07-20 19:09:51 +02:00
commit f008fecccf
No known key found for this signature in database
GPG Key ID: D743C50C8B61984C
33 changed files with 333 additions and 998 deletions

View File

@ -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",
},
}],
};

View File

@ -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 -->

View File

@ -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 -->

View File

@ -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
View File

@ -20,3 +20,5 @@ electron/pub
/.tmp
/webpack-stats.json
/src/component-index.js.tmp
.vscode
.vscode/

View File

@ -1,9 +1,6 @@
{
"minify": true,
"classPrefix": "modernizr_",
"options": [
"setClasses"
],
"enableClasses": false,
"feature-detects": [
"test/css/animations",
"test/css/displaytable",

View File

@ -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)

View File

@ -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

View File

@ -301,6 +301,7 @@ cd element-web
yarn link matrix-js-sdk
yarn link matrix-react-sdk
yarn install
yarn reskindex
yarn start
```

View File

@ -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",
],

View File

@ -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).+$",

View File

@ -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

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
import "matrix-react-sdk/src/@types/global"; // load matrix-react-sdk's type extensions first
import type {Renderer} from "react-dom";
import type { Renderer } from "react-dom";
type ElectronChannel =
"app_onAction" |

View File

@ -27,7 +27,7 @@ interface IProps {
}
const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
const {brand, mobileBuilds} = SdkConfig.get();
const { brand, mobileBuilds } = SdkConfig.get();
let ios = null;
const iosCustomUrl = mobileBuilds?.ios;
@ -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;
}

View File

@ -27,7 +27,7 @@ interface IProps {
messages?: string[];
}
const ErrorView: React.FC<IProps> = ({title, messages}) => {
const ErrorView: React.FC<IProps> = ({ title, messages }) => {
return <div className="mx_ErrorView">
<div className="mx_ErrorView_container">
<div className="mx_HomePage_header">

View File

@ -22,10 +22,10 @@ import { _t } from 'matrix-react-sdk/src/languageHandler';
const VectorAuthFooter = () => {
const brandingConfig = SdkConfig.get().branding;
let links = [
//{"text": "Blog", "url": "https://element.io/blog"},
//{"text": "Twitter", "url": "https://twitter.com/element_hq"},
{"text": "About", "url": "https://schildi.chat"},
{"text": "GitHub", "url": "https://github.com/SchildiChat/schildichat-desktop"},
//{ "text": "Blog", "url": "https://element.io/blog" },
//{ "text": "Twitter", "url": "https://twitter.com/element_hq" },
{ "text": "About", "url": "https://schildi.chat" },
{ "text": "GitHub", "url": "https://github.com/SchildiChat/schildichat-desktop" },
];
if (brandingConfig && brandingConfig.authFooterLinks) {

View File

@ -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;

View File

@ -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;

View File

@ -57,7 +57,7 @@ export default class Favicon {
private readyCb = () => {};
constructor(params: Partial<IParams> = {}) {
this.params = {...defaults, ...params};
this.params = { ...defaults, ...params };
this.icons = Favicon.getIcons();
// create work canvas
@ -125,7 +125,7 @@ export default class Favicon {
}
private circle(n: number | string, opts?: Partial<IParams>) {
const params = {...this.params, ...opts};
const params = { ...this.params, ...opts };
const opt = this.options(n, params);
let more = false;
@ -214,7 +214,7 @@ export default class Favicon {
if (!this.isReady) {
this.readyCb = () => {
this.badge(content, opts);
}
};
return;
}

View File

@ -25,17 +25,17 @@ window.React = React;
import * as sdk from 'matrix-react-sdk';
import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg';
import {_td, newTranslatableError} from 'matrix-react-sdk/src/languageHandler';
import { _td, newTranslatableError } from 'matrix-react-sdk/src/languageHandler';
import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
import {AutoDiscovery} from "matrix-js-sdk/src/autodiscovery";
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 { MatrixClientPeg } from 'matrix-react-sdk/src/MatrixClientPeg';
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import {parseQs, parseQsFromFragment} from './url_utils';
import { parseQs, parseQsFromFragment } from './url_utils';
import VectorBasePlatform from "./platform/VectorBasePlatform";
import {createClient} from "matrix-js-sdk/src/matrix";
import { createClient } from "matrix-js-sdk/src/matrix";
let lastLocationHashSet: string = null;
@ -257,12 +257,12 @@ async function verifyServerConfig() {
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
} catch (e) {
const {hsUrl, isUrl, userId} = await Lifecycle.getStoredSessionVars();
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) {
console.error(e);
console.warn("A session was found - suppressing config error and using the session's homeserver");
console.log("Using pre-existing hsUrl and isUrl: ", {hsUrl, isUrl});
console.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
} else {
// the user is not logged in, so scream
@ -277,7 +277,7 @@ async function verifyServerConfig() {
// Add the newly built config to the actual config for use by the app
console.log("Updating SdkConfig with validated discovery information");
SdkConfig.add({"validated_server_config": validatedConfig});
SdkConfig.add({ "validated_server_config": validatedConfig });
return SdkConfig.get();
}

View File

@ -55,7 +55,7 @@ function getConfig(configJsonFilename: string): Promise<{}> {
resolve({});
}
}
reject({err: err, response: response});
reject({ err: err, response: response });
return;
}
@ -65,7 +65,7 @@ function getConfig(configJsonFilename: string): Promise<{}> {
// loading from the filesystem (see above).
resolve(JSON.parse(body));
} catch (e) {
reject({err: e});
reject({ err: e });
}
},
);

View File

@ -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 -->

View File

@ -26,7 +26,7 @@ require('highlight.js/styles/github.css');
require('katex/dist/katex.css');
// These are things that can run before the skin loads - be careful not to reference the react-sdk though.
import {parseQsFromFragment} from "./url_utils";
import { parseQsFromFragment } from "./url_utils";
import './modernizr';
async function settled(...promises: Array<Promise<any>>) {

View File

@ -14,7 +14,7 @@ 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.js';
const remoteWorker = new IndexedDBStoreWorker(postMessage);

View File

@ -31,10 +31,9 @@ import PWAPlatform from "./platform/PWAPlatform";
import WebPlatform from "./platform/WebPlatform";
import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import {setTheme} from "matrix-react-sdk/src/theme";
import {initRageshake, initRageshakeStore} from "./rageshakesetup";
import { setTheme } from "matrix-react-sdk/src/theme";
import { initRageshake, initRageshakeStore } from "./rageshakesetup";
export const rageshakePromise = initRageshake();

View File

@ -18,7 +18,7 @@ limitations under the License.
require("./index.scss");
import * as qs from 'querystring';
import {KJUR} from 'jsrsasign';
import { KJUR } from 'jsrsasign';
import {
IOpenIDCredentials,
IWidgetApiRequest,
@ -138,7 +138,7 @@ let meetApi: any; // JitsiMeetExternalAPI
});
widgetApi.transport.reply(ev.detail, {}); // ack
} else {
widgetApi.transport.reply(ev.detail, {error: {message: "Conference not joined"}});
widgetApi.transport.reply(ev.detail, { error: { message: "Conference not joined" } });
}
},
);
@ -168,7 +168,7 @@ function switchVisibleContainers() {
*/
function createJWTToken() {
// Header
const header = {alg: 'HS256', typ: 'JWT'};
const header = { alg: 'HS256', typ: 'JWT' };
// Payload
const payload = {
// As per Jitsi token auth, `iss` needs to be set to something agreed between

View File

@ -1,19 +1,21 @@
import {getVectorConfig} from '../getconfig';
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

View File

@ -48,7 +48,7 @@ import React from "react";
import { randomString } from "matrix-js-sdk/src/randomstring";
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads";
import { SwitchSpacePayload} from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload";
import { SwitchSpacePayload } from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload";
import { showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
import { CheckUpdatesPayload } from "matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload";
import ToastStore from "matrix-react-sdk/src/stores/ToastStore";
@ -119,8 +119,8 @@ class SeshatIndexManager extends BaseEventIndexManager {
// TODO this should be moved into the preload.js file.
const ipcCallId = ++this.nextIpcCallId;
return new Promise((resolve, reject) => {
this.pendingIpcCalls[ipcCallId] = {resolve, reject};
window.electron.send('seshat', {id: ipcCallId, name, args});
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
window.electron.send('seshat', { id: ipcCallId, name, args });
});
}
@ -258,9 +258,9 @@ export default class ElectronPlatform extends VectorBasePlatform {
dis.fire(Action.ViewUserSettings);
});
electron.on('userDownloadCompleted', (ev, {path, name}) => {
electron.on('userDownloadCompleted', (ev, { path, name }) => {
const onAccept = () => {
electron.send('userDownloadOpen', {path});
electron.send('userDownloadOpen', { path });
};
ToastStore.sharedInstance().addOrReplaceToast({
@ -326,7 +326,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this._ipcCall('getConfig');
}
onUpdateDownloaded = async (ev, {releaseNotes, releaseName}) => {
onUpdateDownloaded = async (ev, { releaseNotes, releaseName }) => {
dis.dispatch<CheckUpdatesPayload>({
action: Action.CheckUpdates,
status: UpdateCheckStatus.Ready,
@ -497,8 +497,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
async _ipcCall(name: string, ...args: any[]): Promise<any> {
const ipcCallId = ++this.nextIpcCallId;
return new Promise((resolve, reject) => {
this.pendingIpcCalls[ipcCallId] = {resolve, reject};
window.electron.send('ipcCall', {id: ipcCallId, name, args});
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
window.electron.send('ipcCall', { id: ipcCallId, name, args });
// Maybe add a timeout to these? Probably not necessary.
});
}

View File

@ -18,8 +18,8 @@ limitations under the License.
*/
import BasePlatform from 'matrix-react-sdk/src/BasePlatform';
import {_t} from 'matrix-react-sdk/src/languageHandler';
import {getVectorConfig} from "../getconfig";
import { _t } from 'matrix-react-sdk/src/languageHandler';
import { getVectorConfig } from "../getconfig";
import Favicon from "../../favicon";

View File

@ -17,13 +17,13 @@ limitations under the License.
*/
import VectorBasePlatform from './VectorBasePlatform';
import {UpdateCheckStatus} from "matrix-react-sdk/src/BasePlatform";
import { UpdateCheckStatus } from "matrix-react-sdk/src/BasePlatform";
import request from 'browser-request';
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
import {_t} from 'matrix-react-sdk/src/languageHandler';
import {Room} from "matrix-js-sdk/src/models/room";
import {hideToast as hideUpdateToast, showToast as showUpdateToast} from "matrix-react-sdk/src/toasts/UpdateToast";
import {Action} from "matrix-react-sdk/src/dispatcher/actions";
import { _t } from 'matrix-react-sdk/src/languageHandler';
import { Room } from "matrix-js-sdk/src/models/room";
import { hideToast as hideUpdateToast, showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
import { CheckUpdatesPayload } from 'matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload';
import UAParser from 'ua-parser-js';

View File

@ -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.

1068
yarn.lock

File diff suppressed because it is too large Load Diff