Upgrade dependencies, including Electron 18.0.1.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-03-31 21:21:21 -07:00
parent 829b2a0f2a
commit 3b04b61662
31 changed files with 6171 additions and 7348 deletions

View File

@@ -4,6 +4,7 @@ import type {
ContextMenuParams,
MenuItemConstructorOptions,
} from "electron/renderer";
import process from "process";
import {Menu} from "@electron/remote";

View File

@@ -1,3 +1,5 @@
import process from "process";
import type {Html} from "../../../common/html";
import {html} from "../../../common/html";
import {ipcRenderer} from "../typed-ipc-renderer";

View File

@@ -1,6 +1,7 @@
import type {WebContents} from "electron/main";
import fs from "fs";
import path from "path";
import process from "process";
import * as remote from "@electron/remote";
import {app, dialog} from "@electron/remote";
@@ -34,34 +35,6 @@ interface WebViewProps {
}
export default class WebView {
props: WebViewProps;
zoomFactor: number;
badgeCount: number;
loading: boolean;
customCss: string | false | null;
$webviewsContainer: DOMTokenList;
$el: HTMLElement;
webContentsId: number;
private constructor(
props: WebViewProps,
$element: HTMLElement,
webContentsId: number,
) {
this.props = props;
this.zoomFactor = 1;
this.loading = true;
this.badgeCount = 0;
this.customCss = ConfigUtil.getConfigItem("customCSS", null);
this.$webviewsContainer = document.querySelector(
"#webviews-container",
)!.classList;
this.$el = $element;
this.webContentsId = webContentsId;
this.registerListeners();
}
static templateHtml(props: WebViewProps): Html {
return html`
<webview
@@ -119,6 +92,34 @@ export default class WebView {
return new WebView(props, $element, webContentsId);
}
props: WebViewProps;
zoomFactor: number;
badgeCount: number;
loading: boolean;
customCss: string | false | null;
$webviewsContainer: DOMTokenList;
$el: HTMLElement;
webContentsId: number;
private constructor(
props: WebViewProps,
$element: HTMLElement,
webContentsId: number,
) {
this.props = props;
this.zoomFactor = 1;
this.loading = true;
this.badgeCount = 0;
this.customCss = ConfigUtil.getConfigItem("customCSS", null);
this.$webviewsContainer = document.querySelector(
"#webviews-container",
)!.classList;
this.$el = $element;
this.webContentsId = webContentsId;
this.registerListeners();
}
getWebContents(): WebContents {
return remote.webContents.fromId(this.webContentsId);
}