mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	Use .ts extensions for imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		@@ -7,9 +7,9 @@ import {DataError} from "node-json-db/dist/lib/Errors";
 | 
			
		||||
import type {z} from "zod";
 | 
			
		||||
import {app, dialog} from "zulip:remote";
 | 
			
		||||
 | 
			
		||||
import {configSchemata} from "./config-schemata.js";
 | 
			
		||||
import * as EnterpriseUtil from "./enterprise-util.js";
 | 
			
		||||
import Logger from "./logger-util.js";
 | 
			
		||||
import {configSchemata} from "./config-schemata.ts";
 | 
			
		||||
import * as EnterpriseUtil from "./enterprise-util.ts";
 | 
			
		||||
import Logger from "./logger-util.ts";
 | 
			
		||||
 | 
			
		||||
export type Config = {
 | 
			
		||||
  [Key in keyof typeof configSchemata]: z.output<(typeof configSchemata)[Key]>;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,8 @@ import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import type {z} from "zod";
 | 
			
		||||
 | 
			
		||||
import type {dndSettingsSchemata} from "./config-schemata.js";
 | 
			
		||||
import * as ConfigUtil from "./config-util.js";
 | 
			
		||||
import type {dndSettingsSchemata} from "./config-schemata.ts";
 | 
			
		||||
import * as ConfigUtil from "./config-util.ts";
 | 
			
		||||
 | 
			
		||||
export type DndSettings = {
 | 
			
		||||
  [Key in keyof typeof dndSettingsSchemata]: z.output<
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@ import process from "node:process";
 | 
			
		||||
import {z} from "zod";
 | 
			
		||||
import {dialog} from "zulip:remote";
 | 
			
		||||
 | 
			
		||||
import {enterpriseConfigSchemata} from "./config-schemata.js";
 | 
			
		||||
import Logger from "./logger-util.js";
 | 
			
		||||
import {enterpriseConfigSchemata} from "./config-schemata.ts";
 | 
			
		||||
import Logger from "./logger-util.ts";
 | 
			
		||||
 | 
			
		||||
type EnterpriseConfig = {
 | 
			
		||||
  [Key in keyof typeof enterpriseConfigSchemata]: z.output<
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ import fs from "node:fs";
 | 
			
		||||
import os from "node:os";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import {html} from "./html.js";
 | 
			
		||||
import {html} from "./html.ts";
 | 
			
		||||
 | 
			
		||||
export async function openBrowser(url: URL): Promise<void> {
 | 
			
		||||
  if (["http:", "https:", "mailto:"].includes(url.protocol)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {app} from "zulip:remote";
 | 
			
		||||
 | 
			
		||||
import {initSetUp} from "./default-util.js";
 | 
			
		||||
import {initSetUp} from "./default-util.ts";
 | 
			
		||||
 | 
			
		||||
type LoggerOptions = {
 | 
			
		||||
  file?: string;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,8 @@ import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import i18n from "i18n";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "./config-util.js";
 | 
			
		||||
import {publicPath} from "./paths.js";
 | 
			
		||||
import * as ConfigUtil from "./config-util.ts";
 | 
			
		||||
import {publicPath} from "./paths.ts";
 | 
			
		||||
 | 
			
		||||
i18n.configure({
 | 
			
		||||
  directory: path.join(publicPath, "translations/"),
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
import type {DndSettings} from "./dnd-util.js";
 | 
			
		||||
import type {MenuProperties, ServerConfig} from "./types.js";
 | 
			
		||||
import type {DndSettings} from "./dnd-util.ts";
 | 
			
		||||
import type {MenuProperties, ServerConfig} from "./types.ts";
 | 
			
		||||
 | 
			
		||||
export type MainMessage = {
 | 
			
		||||
  "clear-app-settings": () => void;
 | 
			
		||||
 
 | 
			
		||||
@@ -9,10 +9,10 @@ import {
 | 
			
		||||
  autoUpdater,
 | 
			
		||||
} from "electron-updater";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import * as t from "../common/translation-util.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
import * as t from "../common/translation-util.ts";
 | 
			
		||||
 | 
			
		||||
import {linuxUpdateNotification} from "./linuxupdater.js"; // Required only in case of linux
 | 
			
		||||
import {linuxUpdateNotification} from "./linuxupdater.ts"; // Required only in case of linux
 | 
			
		||||
 | 
			
		||||
let quitting = false;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,9 +2,9 @@ import {nativeImage} from "electron/common";
 | 
			
		||||
import {type BrowserWindow, app} from "electron/main";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
 | 
			
		||||
import {send} from "./typed-ipc-main.js";
 | 
			
		||||
import {send} from "./typed-ipc-main.ts";
 | 
			
		||||
 | 
			
		||||
function showBadgeCount(messageCount: number, mainWindow: BrowserWindow): void {
 | 
			
		||||
  if (process.platform === "win32") {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,10 +9,10 @@ import {
 | 
			
		||||
import fs from "node:fs";
 | 
			
		||||
import path from "node:path";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import * as LinkUtil from "../common/link-util.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
import * as LinkUtil from "../common/link-util.ts";
 | 
			
		||||
 | 
			
		||||
import {send} from "./typed-ipc-main.js";
 | 
			
		||||
import {send} from "./typed-ipc-main.ts";
 | 
			
		||||
 | 
			
		||||
function isUploadsUrl(server: string, url: URL): boolean {
 | 
			
		||||
  return url.origin === server && url.pathname.startsWith("/user_uploads/");
 | 
			
		||||
 
 | 
			
		||||
@@ -17,20 +17,20 @@ import process from "node:process";
 | 
			
		||||
import * as remoteMain from "@electron/remote/main";
 | 
			
		||||
import windowStateKeeper from "electron-window-state";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import {bundlePath, bundleUrl, publicPath} from "../common/paths.js";
 | 
			
		||||
import * as t from "../common/translation-util.js";
 | 
			
		||||
import type {RendererMessage} from "../common/typed-ipc.js";
 | 
			
		||||
import type {MenuProperties} from "../common/types.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
import {bundlePath, bundleUrl, publicPath} from "../common/paths.ts";
 | 
			
		||||
import * as t from "../common/translation-util.ts";
 | 
			
		||||
import type {RendererMessage} from "../common/typed-ipc.ts";
 | 
			
		||||
import type {MenuProperties} from "../common/types.ts";
 | 
			
		||||
 | 
			
		||||
import {appUpdater, shouldQuitForUpdate} from "./autoupdater.js";
 | 
			
		||||
import * as BadgeSettings from "./badge-settings.js";
 | 
			
		||||
import handleExternalLink from "./handle-external-link.js";
 | 
			
		||||
import * as AppMenu from "./menu.js";
 | 
			
		||||
import {_getServerSettings, _isOnline, _saveServerIcon} from "./request.js";
 | 
			
		||||
import {sentryInit} from "./sentry.js";
 | 
			
		||||
import {setAutoLaunch} from "./startup.js";
 | 
			
		||||
import {ipcMain, send} from "./typed-ipc-main.js";
 | 
			
		||||
import {appUpdater, shouldQuitForUpdate} from "./autoupdater.ts";
 | 
			
		||||
import * as BadgeSettings from "./badge-settings.ts";
 | 
			
		||||
import handleExternalLink from "./handle-external-link.ts";
 | 
			
		||||
import * as AppMenu from "./menu.ts";
 | 
			
		||||
import {_getServerSettings, _isOnline, _saveServerIcon} from "./request.ts";
 | 
			
		||||
import {sentryInit} from "./sentry.ts";
 | 
			
		||||
import {setAutoLaunch} from "./startup.ts";
 | 
			
		||||
import {ipcMain, send} from "./typed-ipc-main.ts";
 | 
			
		||||
 | 
			
		||||
import "gatemaker/electron-setup"; // eslint-disable-line import/no-unassigned-import
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@ import path from "node:path";
 | 
			
		||||
import {JsonDB} from "node-json-db";
 | 
			
		||||
import {DataError} from "node-json-db/dist/lib/Errors";
 | 
			
		||||
 | 
			
		||||
import Logger from "../common/logger-util.js";
 | 
			
		||||
import * as t from "../common/translation-util.js";
 | 
			
		||||
import Logger from "../common/logger-util.ts";
 | 
			
		||||
import * as t from "../common/translation-util.ts";
 | 
			
		||||
 | 
			
		||||
const logger = new Logger({
 | 
			
		||||
  file: "linux-update-util.log",
 | 
			
		||||
 
 | 
			
		||||
@@ -3,10 +3,10 @@ import {Notification, type Session, app} from "electron/main";
 | 
			
		||||
import * as semver from "semver";
 | 
			
		||||
import {z} from "zod";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import Logger from "../common/logger-util.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
import Logger from "../common/logger-util.ts";
 | 
			
		||||
 | 
			
		||||
import * as LinuxUpdateUtil from "./linux-update-util.js";
 | 
			
		||||
import * as LinuxUpdateUtil from "./linux-update-util.ts";
 | 
			
		||||
 | 
			
		||||
const logger = new Logger({
 | 
			
		||||
  file: "linux-update-util.log",
 | 
			
		||||
 
 | 
			
		||||
@@ -9,14 +9,14 @@ import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import AdmZip from "adm-zip";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import * as DNDUtil from "../common/dnd-util.js";
 | 
			
		||||
import * as t from "../common/translation-util.js";
 | 
			
		||||
import type {RendererMessage} from "../common/typed-ipc.js";
 | 
			
		||||
import type {MenuProperties, TabData} from "../common/types.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
import * as DNDUtil from "../common/dnd-util.ts";
 | 
			
		||||
import * as t from "../common/translation-util.ts";
 | 
			
		||||
import type {RendererMessage} from "../common/typed-ipc.ts";
 | 
			
		||||
import type {MenuProperties, TabData} from "../common/types.ts";
 | 
			
		||||
 | 
			
		||||
import {appUpdater} from "./autoupdater.js";
 | 
			
		||||
import {send} from "./typed-ipc-main.js";
 | 
			
		||||
import {appUpdater} from "./autoupdater.ts";
 | 
			
		||||
import {send} from "./typed-ipc-main.ts";
 | 
			
		||||
 | 
			
		||||
const appName = app.name;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,9 +8,9 @@ import type {ReadableStream} from "node:stream/web";
 | 
			
		||||
import * as Sentry from "@sentry/electron/main";
 | 
			
		||||
import {z} from "zod";
 | 
			
		||||
 | 
			
		||||
import Logger from "../common/logger-util.js";
 | 
			
		||||
import * as Messages from "../common/messages.js";
 | 
			
		||||
import type {ServerConfig} from "../common/types.js";
 | 
			
		||||
import Logger from "../common/logger-util.ts";
 | 
			
		||||
import * as Messages from "../common/messages.ts";
 | 
			
		||||
import type {ServerConfig} from "../common/types.ts";
 | 
			
		||||
 | 
			
		||||
/* Request: domain-util */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ import {app} from "electron/main";
 | 
			
		||||
 | 
			
		||||
import * as Sentry from "@sentry/electron/main";
 | 
			
		||||
 | 
			
		||||
import {getConfigItem} from "../common/config-util.js";
 | 
			
		||||
import {getConfigItem} from "../common/config-util.ts";
 | 
			
		||||
 | 
			
		||||
export const sentryInit = (): void => {
 | 
			
		||||
  Sentry.init({
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import AutoLaunch from "auto-launch";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.js";
 | 
			
		||||
import * as ConfigUtil from "../common/config-util.ts";
 | 
			
		||||
 | 
			
		||||
export const setAutoLaunch = async (
 | 
			
		||||
  AutoLaunchValue: boolean,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
// This helper is exposed via electron_bridge for use in the social
 | 
			
		||||
// login flow.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import type {Html} from "../../../common/html.js";
 | 
			
		||||
import type {Html} from "../../../common/html.ts";
 | 
			
		||||
 | 
			
		||||
export function generateNodeFromHtml(html: Html): Element {
 | 
			
		||||
  const wrapper = document.createElement("div");
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {Menu} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
import * as t from "../../../common/translation-util.js";
 | 
			
		||||
import * as t from "../../../common/translation-util.ts";
 | 
			
		||||
 | 
			
		||||
export const contextMenu = (
 | 
			
		||||
  webContents: WebContents,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import {type Html, html} from "../../../common/html.js";
 | 
			
		||||
import type {TabPage} from "../../../common/types.js";
 | 
			
		||||
import {type Html, html} from "../../../common/html.ts";
 | 
			
		||||
import type {TabPage} from "../../../common/types.ts";
 | 
			
		||||
 | 
			
		||||
import {generateNodeFromHtml} from "./base.js";
 | 
			
		||||
import Tab, {type TabProperties} from "./tab.js";
 | 
			
		||||
import {generateNodeFromHtml} from "./base.ts";
 | 
			
		||||
import Tab, {type TabProperties} from "./tab.ts";
 | 
			
		||||
 | 
			
		||||
export type FunctionalTabProperties = {
 | 
			
		||||
  $view: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {type Html, html} from "../../../common/html.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import {type Html, html} from "../../../common/html.ts";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
import {generateNodeFromHtml} from "./base.js";
 | 
			
		||||
import Tab, {type TabProperties} from "./tab.js";
 | 
			
		||||
import type WebView from "./webview.js";
 | 
			
		||||
import {generateNodeFromHtml} from "./base.ts";
 | 
			
		||||
import Tab, {type TabProperties} from "./tab.ts";
 | 
			
		||||
import type WebView from "./webview.ts";
 | 
			
		||||
 | 
			
		||||
export type ServerTabProperties = {
 | 
			
		||||
  webview: Promise<WebView>;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import type {TabPage, TabRole} from "../../../common/types.js";
 | 
			
		||||
import type {TabPage, TabRole} from "../../../common/types.ts";
 | 
			
		||||
 | 
			
		||||
export type TabProperties = {
 | 
			
		||||
  role: TabRole;
 | 
			
		||||
 
 | 
			
		||||
@@ -5,17 +5,17 @@ import process from "node:process";
 | 
			
		||||
import * as remote from "@electron/remote";
 | 
			
		||||
import {app, dialog} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../../../common/config-util.js";
 | 
			
		||||
import {type Html, html} from "../../../common/html.js";
 | 
			
		||||
import * as t from "../../../common/translation-util.js";
 | 
			
		||||
import type {RendererMessage} from "../../../common/typed-ipc.js";
 | 
			
		||||
import type {TabRole} from "../../../common/types.js";
 | 
			
		||||
import * as ConfigUtil from "../../../common/config-util.ts";
 | 
			
		||||
import {type Html, html} from "../../../common/html.ts";
 | 
			
		||||
import * as t from "../../../common/translation-util.ts";
 | 
			
		||||
import type {RendererMessage} from "../../../common/typed-ipc.ts";
 | 
			
		||||
import type {TabRole} from "../../../common/types.ts";
 | 
			
		||||
import preloadCss from "../../css/preload.css?raw";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import * as SystemUtil from "../utils/system-util.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
import * as SystemUtil from "../utils/system-util.ts";
 | 
			
		||||
 | 
			
		||||
import {generateNodeFromHtml} from "./base.js";
 | 
			
		||||
import {contextMenu} from "./context-menu.js";
 | 
			
		||||
import {generateNodeFromHtml} from "./base.ts";
 | 
			
		||||
import {contextMenu} from "./context-menu.ts";
 | 
			
		||||
 | 
			
		||||
const shouldSilentWebview = ConfigUtil.getConfigItem("silent", false);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,9 +3,9 @@ import {EventEmitter} from "node:events";
 | 
			
		||||
import {
 | 
			
		||||
  type ClipboardDecrypter,
 | 
			
		||||
  ClipboardDecrypterImplementation,
 | 
			
		||||
} from "./clipboard-decrypter.js";
 | 
			
		||||
import {type NotificationData, newNotification} from "./notification/index.js";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
 | 
			
		||||
} from "./clipboard-decrypter.ts";
 | 
			
		||||
import {type NotificationData, newNotification} from "./notification/index.ts";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
type ListenerType = (...arguments_: any[]) => void;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,17 +7,17 @@ import {Menu, app, dialog, session} from "@electron/remote";
 | 
			
		||||
import * as remote from "@electron/remote";
 | 
			
		||||
import * as Sentry from "@sentry/electron/renderer";
 | 
			
		||||
 | 
			
		||||
import type {Config} from "../../common/config-util.js";
 | 
			
		||||
import * as ConfigUtil from "../../common/config-util.js";
 | 
			
		||||
import * as DNDUtil from "../../common/dnd-util.js";
 | 
			
		||||
import type {DndSettings} from "../../common/dnd-util.js";
 | 
			
		||||
import * as EnterpriseUtil from "../../common/enterprise-util.js";
 | 
			
		||||
import {html} from "../../common/html.js";
 | 
			
		||||
import * as LinkUtil from "../../common/link-util.js";
 | 
			
		||||
import Logger from "../../common/logger-util.js";
 | 
			
		||||
import * as Messages from "../../common/messages.js";
 | 
			
		||||
import {bundlePath, bundleUrl} from "../../common/paths.js";
 | 
			
		||||
import * as t from "../../common/translation-util.js";
 | 
			
		||||
import type {Config} from "../../common/config-util.ts";
 | 
			
		||||
import * as ConfigUtil from "../../common/config-util.ts";
 | 
			
		||||
import * as DNDUtil from "../../common/dnd-util.ts";
 | 
			
		||||
import type {DndSettings} from "../../common/dnd-util.ts";
 | 
			
		||||
import * as EnterpriseUtil from "../../common/enterprise-util.ts";
 | 
			
		||||
import {html} from "../../common/html.ts";
 | 
			
		||||
import * as LinkUtil from "../../common/link-util.ts";
 | 
			
		||||
import Logger from "../../common/logger-util.ts";
 | 
			
		||||
import * as Messages from "../../common/messages.ts";
 | 
			
		||||
import {bundlePath, bundleUrl} from "../../common/paths.ts";
 | 
			
		||||
import * as t from "../../common/translation-util.ts";
 | 
			
		||||
import type {
 | 
			
		||||
  NavigationItem,
 | 
			
		||||
  ServerConfig,
 | 
			
		||||
@@ -26,15 +26,15 @@ import type {
 | 
			
		||||
} from "../../common/types.js";
 | 
			
		||||
import defaultIcon from "../img/icon.png";
 | 
			
		||||
 | 
			
		||||
import FunctionalTab from "./components/functional-tab.js";
 | 
			
		||||
import ServerTab from "./components/server-tab.js";
 | 
			
		||||
import WebView from "./components/webview.js";
 | 
			
		||||
import {AboutView} from "./pages/about.js";
 | 
			
		||||
import {PreferenceView} from "./pages/preference/preference.js";
 | 
			
		||||
import {initializeTray} from "./tray.js";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
 | 
			
		||||
import * as DomainUtil from "./utils/domain-util.js";
 | 
			
		||||
import ReconnectUtil from "./utils/reconnect-util.js";
 | 
			
		||||
import FunctionalTab from "./components/functional-tab.ts";
 | 
			
		||||
import ServerTab from "./components/server-tab.ts";
 | 
			
		||||
import WebView from "./components/webview.ts";
 | 
			
		||||
import {AboutView} from "./pages/about.ts";
 | 
			
		||||
import {PreferenceView} from "./pages/preference/preference.ts";
 | 
			
		||||
import {initializeTray} from "./tray.ts";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.ts";
 | 
			
		||||
import * as DomainUtil from "./utils/domain-util.ts";
 | 
			
		||||
import ReconnectUtil from "./utils/reconnect-util.ts";
 | 
			
		||||
 | 
			
		||||
Sentry.init({});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
export type NotificationData = {
 | 
			
		||||
  close: () => void;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
import {app} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
import {Html, html} from "../../../common/html.js";
 | 
			
		||||
import {bundleUrl} from "../../../common/paths.js";
 | 
			
		||||
import * as t from "../../../common/translation-util.js";
 | 
			
		||||
import {generateNodeFromHtml} from "../components/base.js";
 | 
			
		||||
import {Html, html} from "../../../common/html.ts";
 | 
			
		||||
import {bundleUrl} from "../../../common/paths.ts";
 | 
			
		||||
import * as t from "../../../common/translation-util.ts";
 | 
			
		||||
import {generateNodeFromHtml} from "../components/base.ts";
 | 
			
		||||
 | 
			
		||||
export class AboutView {
 | 
			
		||||
  static async create(): Promise<AboutView> {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
export function init(
 | 
			
		||||
  $reconnectButton: Element,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import {type Html, html} from "../../../../common/html.js";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import {type Html, html} from "../../../../common/html.ts";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
type BaseSectionProperties = {
 | 
			
		||||
  $element: HTMLElement;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import * as DomainUtil from "../../utils/domain-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
import * as DomainUtil from "../../utils/domain-util.ts";
 | 
			
		||||
 | 
			
		||||
import {reloadApp} from "./base-section.js";
 | 
			
		||||
import {initFindAccounts} from "./find-accounts.js";
 | 
			
		||||
import {initServerInfoForm} from "./server-info-form.js";
 | 
			
		||||
import {reloadApp} from "./base-section.ts";
 | 
			
		||||
import {initFindAccounts} from "./find-accounts.ts";
 | 
			
		||||
import {initServerInfoForm} from "./server-info-form.ts";
 | 
			
		||||
 | 
			
		||||
type ConnectedOrgSectionProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.js";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.ts";
 | 
			
		||||
 | 
			
		||||
type FindAccountsProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -9,13 +9,13 @@ import Tagify from "@yaireo/tagify";
 | 
			
		||||
import {z} from "zod";
 | 
			
		||||
 | 
			
		||||
import supportedLocales from "../../../../../public/translations/supported-locales.json";
 | 
			
		||||
import * as ConfigUtil from "../../../../common/config-util.js";
 | 
			
		||||
import * as EnterpriseUtil from "../../../../common/enterprise-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import * as ConfigUtil from "../../../../common/config-util.ts";
 | 
			
		||||
import * as EnterpriseUtil from "../../../../common/enterprise-util.ts";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
import {generateSelectHtml, generateSettingOption} from "./base-section.js";
 | 
			
		||||
import {generateSelectHtml, generateSettingOption} from "./base-section.ts";
 | 
			
		||||
 | 
			
		||||
const currentBrowserWindow = remote.getCurrentWindow();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import {type Html, html} from "../../../../common/html.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import type {NavigationItem} from "../../../../common/types.js";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.js";
 | 
			
		||||
import {type Html, html} from "../../../../common/html.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import type {NavigationItem} from "../../../../common/types.ts";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.ts";
 | 
			
		||||
 | 
			
		||||
type PreferenceNavigationProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
import * as ConfigUtil from "../../../../common/config-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import * as ConfigUtil from "../../../../common/config-util.ts";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
import {generateSettingOption} from "./base-section.js";
 | 
			
		||||
import {generateSettingOption} from "./base-section.ts";
 | 
			
		||||
 | 
			
		||||
type NetworkSectionProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,11 @@
 | 
			
		||||
import {dialog} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import * as DomainUtil from "../../utils/domain-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
import * as DomainUtil from "../../utils/domain-util.ts";
 | 
			
		||||
 | 
			
		||||
type NewServerFormProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,17 +1,17 @@
 | 
			
		||||
import type {IpcRendererEvent} from "electron/renderer";
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import type {DndSettings} from "../../../../common/dnd-util.js";
 | 
			
		||||
import {bundleUrl} from "../../../../common/paths.js";
 | 
			
		||||
import type {NavigationItem} from "../../../../common/types.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import type {DndSettings} from "../../../../common/dnd-util.ts";
 | 
			
		||||
import {bundleUrl} from "../../../../common/paths.ts";
 | 
			
		||||
import type {NavigationItem} from "../../../../common/types.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
import {initConnectedOrgSection} from "./connected-org-section.js";
 | 
			
		||||
import {initGeneralSection} from "./general-section.js";
 | 
			
		||||
import Nav from "./nav.js";
 | 
			
		||||
import {initNetworkSection} from "./network-section.js";
 | 
			
		||||
import {initServersSection} from "./servers-section.js";
 | 
			
		||||
import {initShortcutsSection} from "./shortcuts-section.js";
 | 
			
		||||
import {initConnectedOrgSection} from "./connected-org-section.ts";
 | 
			
		||||
import {initGeneralSection} from "./general-section.ts";
 | 
			
		||||
import Nav from "./nav.ts";
 | 
			
		||||
import {initNetworkSection} from "./network-section.ts";
 | 
			
		||||
import {initServersSection} from "./servers-section.ts";
 | 
			
		||||
import {initShortcutsSection} from "./shortcuts-section.ts";
 | 
			
		||||
 | 
			
		||||
export class PreferenceView {
 | 
			
		||||
  static async create(): Promise<PreferenceView> {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,12 @@
 | 
			
		||||
import {dialog} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as Messages from "../../../../common/messages.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import type {ServerConfig} from "../../../../common/types.js";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.js";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
 | 
			
		||||
import * as DomainUtil from "../../utils/domain-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as Messages from "../../../../common/messages.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
import type {ServerConfig} from "../../../../common/types.ts";
 | 
			
		||||
import {generateNodeFromHtml} from "../../components/base.ts";
 | 
			
		||||
import {ipcRenderer} from "../../typed-ipc-renderer.ts";
 | 
			
		||||
import * as DomainUtil from "../../utils/domain-util.ts";
 | 
			
		||||
 | 
			
		||||
type ServerInfoFormProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
 | 
			
		||||
import {reloadApp} from "./base-section.js";
 | 
			
		||||
import {initNewServerForm} from "./new-server-form.js";
 | 
			
		||||
import {reloadApp} from "./base-section.ts";
 | 
			
		||||
import {initNewServerForm} from "./new-server-form.ts";
 | 
			
		||||
 | 
			
		||||
type ServersSectionProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {html} from "../../../../common/html.js";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util.js";
 | 
			
		||||
import * as t from "../../../../common/translation-util.js";
 | 
			
		||||
import {html} from "../../../../common/html.ts";
 | 
			
		||||
import * as LinkUtil from "../../../../common/link-util.ts";
 | 
			
		||||
import * as t from "../../../../common/translation-util.ts";
 | 
			
		||||
 | 
			
		||||
type ShortcutsSectionProperties = {
 | 
			
		||||
  $root: Element;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
import {contextBridge} from "electron/renderer";
 | 
			
		||||
 | 
			
		||||
import electron_bridge, {bridgeEvents} from "./electron-bridge.js";
 | 
			
		||||
import * as NetworkError from "./pages/network.js";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
 | 
			
		||||
import electron_bridge, {bridgeEvents} from "./electron-bridge.ts";
 | 
			
		||||
import * as NetworkError from "./pages/network.ts";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
contextBridge.exposeInMainWorld("electron_bridge", electron_bridge);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,12 +5,12 @@ import process from "node:process";
 | 
			
		||||
 | 
			
		||||
import {BrowserWindow, Menu, Tray} from "@electron/remote";
 | 
			
		||||
 | 
			
		||||
import * as ConfigUtil from "../../common/config-util.js";
 | 
			
		||||
import {publicPath} from "../../common/paths.js";
 | 
			
		||||
import type {RendererMessage} from "../../common/typed-ipc.js";
 | 
			
		||||
import * as ConfigUtil from "../../common/config-util.ts";
 | 
			
		||||
import {publicPath} from "../../common/paths.ts";
 | 
			
		||||
import type {RendererMessage} from "../../common/typed-ipc.ts";
 | 
			
		||||
 | 
			
		||||
import type {ServerManagerView} from "./main.js";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
 | 
			
		||||
import type {ServerManagerView} from "./main.ts";
 | 
			
		||||
import {ipcRenderer} from "./typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
let tray: ElectronTray | null = null;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,13 +7,13 @@ import {JsonDB} from "node-json-db";
 | 
			
		||||
import {DataError} from "node-json-db/dist/lib/Errors";
 | 
			
		||||
import {z} from "zod";
 | 
			
		||||
 | 
			
		||||
import * as EnterpriseUtil from "../../../common/enterprise-util.js";
 | 
			
		||||
import Logger from "../../../common/logger-util.js";
 | 
			
		||||
import * as Messages from "../../../common/messages.js";
 | 
			
		||||
import * as t from "../../../common/translation-util.js";
 | 
			
		||||
import type {ServerConfig} from "../../../common/types.js";
 | 
			
		||||
import * as EnterpriseUtil from "../../../common/enterprise-util.ts";
 | 
			
		||||
import Logger from "../../../common/logger-util.ts";
 | 
			
		||||
import * as Messages from "../../../common/messages.ts";
 | 
			
		||||
import * as t from "../../../common/translation-util.ts";
 | 
			
		||||
import type {ServerConfig} from "../../../common/types.ts";
 | 
			
		||||
import defaultIcon from "../../img/icon.png";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
const logger = new Logger({
 | 
			
		||||
  file: "domain-util.log",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
import * as backoff from "backoff";
 | 
			
		||||
 | 
			
		||||
import {html} from "../../../common/html.js";
 | 
			
		||||
import Logger from "../../../common/logger-util.js";
 | 
			
		||||
import type WebView from "../components/webview.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import {html} from "../../../common/html.ts";
 | 
			
		||||
import Logger from "../../../common/logger-util.ts";
 | 
			
		||||
import type WebView from "../components/webview.ts";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
const logger = new Logger({
 | 
			
		||||
  file: "domain-util.log",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
 | 
			
		||||
import {ipcRenderer} from "../typed-ipc-renderer.ts";
 | 
			
		||||
 | 
			
		||||
export const connectivityError: string[] = [
 | 
			
		||||
  "ERR_INTERNET_DISCONNECTED",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user