mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	Upgrade dependencies, including Electron 18.0.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		@@ -4,6 +4,7 @@ import type {
 | 
			
		||||
  ContextMenuParams,
 | 
			
		||||
  MenuItemConstructorOptions,
 | 
			
		||||
} from "electron/renderer";
 | 
			
		||||
import process from "process";
 | 
			
		||||
 | 
			
		||||
import {Menu} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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";
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user