mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 04:53:17 +00:00
Revert "xo: Fix import/extensions."
This reverts commit 5623ab3866.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type {Html} from "../../../common/html.js";
|
||||
import type {Html} from "../../../common/html";
|
||||
|
||||
export function generateNodeFromHtml(html: Html): Element {
|
||||
const wrapper = document.createElement("div");
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {ContextMenuParams} from "electron";
|
||||
|
||||
import {Menu, clipboard} from "@electron/remote";
|
||||
|
||||
import * as t from "../../../common/translation-util.js";
|
||||
import * as t from "../../../common/translation-util";
|
||||
|
||||
export const contextMenu = (
|
||||
webContents: Electron.WebContents,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type {Html} from "../../../common/html.js";
|
||||
import {html} from "../../../common/html.js";
|
||||
import type {Html} from "../../../common/html";
|
||||
import {html} from "../../../common/html";
|
||||
|
||||
import {generateNodeFromHtml} from "./base.js";
|
||||
import type {TabProps} from "./tab.js";
|
||||
import Tab from "./tab.js";
|
||||
import {generateNodeFromHtml} from "./base";
|
||||
import type {TabProps} from "./tab";
|
||||
import Tab from "./tab";
|
||||
|
||||
export interface FunctionalTabProps extends TabProps {
|
||||
$view: Element;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {app, shell} from "@electron/remote";
|
||||
|
||||
import * as ConfigUtil from "../../../common/config-util.js";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
|
||||
import * as LinkUtil from "../utils/link-util.js";
|
||||
import * as ConfigUtil from "../../../common/config-util";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
import * as LinkUtil from "../utils/link-util";
|
||||
|
||||
import type WebView from "./webview.js";
|
||||
import type WebView from "./webview";
|
||||
|
||||
const dingSound = new Audio("../resources/sounds/ding.ogg");
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type {Html} from "../../../common/html.js";
|
||||
import {html} from "../../../common/html.js";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
|
||||
import type {Html} from "../../../common/html";
|
||||
import {html} from "../../../common/html";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
|
||||
import {generateNodeFromHtml} from "./base.js";
|
||||
import type {TabProps} from "./tab.js";
|
||||
import Tab from "./tab.js";
|
||||
import type WebView from "./webview.js";
|
||||
import {generateNodeFromHtml} from "./base";
|
||||
import type {TabProps} from "./tab";
|
||||
import Tab from "./tab";
|
||||
import type WebView from "./webview";
|
||||
|
||||
export interface ServerTabProps extends TabProps {
|
||||
webview: Promise<WebView>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type {TabRole} from "../../../common/types.js";
|
||||
import type {TabRole} from "../../../common/types";
|
||||
|
||||
export interface TabProps {
|
||||
role: TabRole;
|
||||
|
||||
@@ -4,17 +4,17 @@ import path from "path";
|
||||
import * as remote from "@electron/remote";
|
||||
import {app, dialog} from "@electron/remote";
|
||||
|
||||
import * as ConfigUtil from "../../../common/config-util.js";
|
||||
import type {Html} from "../../../common/html.js";
|
||||
import {html} from "../../../common/html.js";
|
||||
import type {RendererMessage} from "../../../common/typed-ipc.js";
|
||||
import type {TabRole} from "../../../common/types.js";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
|
||||
import * as SystemUtil from "../utils/system-util.js";
|
||||
import * as ConfigUtil from "../../../common/config-util";
|
||||
import type {Html} from "../../../common/html";
|
||||
import {html} from "../../../common/html";
|
||||
import type {RendererMessage} from "../../../common/typed-ipc";
|
||||
import type {TabRole} from "../../../common/types";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
import * as SystemUtil from "../utils/system-util";
|
||||
|
||||
import {generateNodeFromHtml} from "./base.js";
|
||||
import {contextMenu} from "./context-menu.js";
|
||||
import handleExternalLink from "./handle-external-link.js";
|
||||
import {generateNodeFromHtml} from "./base";
|
||||
import {contextMenu} from "./context-menu";
|
||||
import handleExternalLink from "./handle-external-link";
|
||||
|
||||
const shouldSilentWebview = ConfigUtil.getConfigItem("silent", false);
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {EventEmitter} from "events";
|
||||
|
||||
import type {ClipboardDecrypter} from "./clipboard-decrypter.js";
|
||||
import {ClipboardDecrypterImpl} from "./clipboard-decrypter.js";
|
||||
import type {NotificationData} from "./notification/index.js";
|
||||
import {newNotification} from "./notification/index.js";
|
||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
|
||||
import type {ClipboardDecrypter} from "./clipboard-decrypter";
|
||||
import {ClipboardDecrypterImpl} from "./clipboard-decrypter";
|
||||
import type {NotificationData} from "./notification";
|
||||
import {newNotification} from "./notification";
|
||||
import {ipcRenderer} from "./typed-ipc-renderer";
|
||||
|
||||
type ListenerType = (...args: any[]) => void;
|
||||
|
||||
|
||||
@@ -5,25 +5,25 @@ import {Menu, app, dialog, session} from "@electron/remote";
|
||||
import * as remote from "@electron/remote";
|
||||
import * as Sentry from "@sentry/electron";
|
||||
|
||||
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 Logger from "../../common/logger-util.js";
|
||||
import * as Messages from "../../common/messages.js";
|
||||
import type {NavItem, ServerConf, TabData} from "../../common/types.js";
|
||||
import type {Config} from "../../common/config-util";
|
||||
import * as ConfigUtil from "../../common/config-util";
|
||||
import * as DNDUtil from "../../common/dnd-util";
|
||||
import type {DndSettings} from "../../common/dnd-util";
|
||||
import * as EnterpriseUtil from "../../common/enterprise-util";
|
||||
import Logger from "../../common/logger-util";
|
||||
import * as Messages from "../../common/messages";
|
||||
import type {NavItem, ServerConf, TabData} from "../../common/types";
|
||||
|
||||
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 * as LinkUtil from "./utils/link-util.js";
|
||||
import ReconnectUtil from "./utils/reconnect-util.js";
|
||||
import FunctionalTab from "./components/functional-tab";
|
||||
import ServerTab from "./components/server-tab";
|
||||
import WebView from "./components/webview";
|
||||
import {AboutView} from "./pages/about";
|
||||
import {PreferenceView} from "./pages/preference/preference";
|
||||
import {initializeTray} from "./tray";
|
||||
import {ipcRenderer} from "./typed-ipc-renderer";
|
||||
import * as DomainUtil from "./utils/domain-util";
|
||||
import * as LinkUtil from "./utils/link-util";
|
||||
import ReconnectUtil from "./utils/reconnect-util";
|
||||
|
||||
Sentry.init({});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
|
||||
export interface NotificationData {
|
||||
close: () => void;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {app} from "@electron/remote";
|
||||
|
||||
import {html} from "../../../common/html.js";
|
||||
import {html} from "../../../common/html";
|
||||
|
||||
export class AboutView {
|
||||
readonly $view: HTMLElement;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
|
||||
export function init(
|
||||
$reconnectButton: Element,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type {Html} from "../../../../common/html.js";
|
||||
import {html} from "../../../../common/html.js";
|
||||
import {generateNodeFromHtml} from "../../components/base.js";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
|
||||
import type {Html} from "../../../../common/html";
|
||||
import {html} from "../../../../common/html";
|
||||
import {generateNodeFromHtml} from "../../components/base";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
|
||||
interface BaseSectionProps {
|
||||
$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";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
import * as DomainUtil from "../../utils/domain-util";
|
||||
|
||||
import {reloadApp} from "./base-section.js";
|
||||
import {initFindAccounts} from "./find-accounts.js";
|
||||
import {initServerInfoForm} from "./server-info-form.js";
|
||||
import {reloadApp} from "./base-section";
|
||||
import {initFindAccounts} from "./find-accounts";
|
||||
import {initServerInfoForm} from "./server-info-form";
|
||||
|
||||
interface ConnectedOrgSectionProps {
|
||||
$root: Element;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {html} from "../../../../common/html.js";
|
||||
import * as t from "../../../../common/translation-util.js";
|
||||
import {generateNodeFromHtml} from "../../components/base.js";
|
||||
import * as LinkUtil from "../../utils/link-util.js";
|
||||
import {html} from "../../../../common/html";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import {generateNodeFromHtml} from "../../components/base";
|
||||
import * as LinkUtil from "../../utils/link-util";
|
||||
|
||||
interface FindAccountsProps {
|
||||
$root: Element;
|
||||
|
||||
@@ -8,14 +8,14 @@ import Tagify from "@yaireo/tagify";
|
||||
import ISO6391 from "iso-639-1";
|
||||
import * as z from "zod";
|
||||
|
||||
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 * as ConfigUtil from "../../../../common/config-util";
|
||||
import * as EnterpriseUtil from "../../../../common/enterprise-util";
|
||||
import {html} from "../../../../common/html";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import supportedLocales from "../../../../translations/supported-locales.json";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
|
||||
import {generateSelectHtml, generateSettingOption} from "./base-section.js";
|
||||
import {generateSelectHtml, generateSettingOption} from "./base-section";
|
||||
|
||||
const currentBrowserWindow = remote.getCurrentWindow();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type {Html} from "../../../../common/html.js";
|
||||
import {html} from "../../../../common/html.js";
|
||||
import * as t from "../../../../common/translation-util.js";
|
||||
import type {NavItem} from "../../../../common/types.js";
|
||||
import {generateNodeFromHtml} from "../../components/base.js";
|
||||
import type {Html} from "../../../../common/html";
|
||||
import {html} from "../../../../common/html";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import type {NavItem} from "../../../../common/types";
|
||||
import {generateNodeFromHtml} from "../../components/base";
|
||||
|
||||
interface PreferenceNavProps {
|
||||
$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";
|
||||
import {html} from "../../../../common/html";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
|
||||
import {generateSettingOption} from "./base-section.js";
|
||||
import {generateSettingOption} from "./base-section";
|
||||
|
||||
interface NetworkSectionProps {
|
||||
$root: Element;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {dialog} from "@electron/remote";
|
||||
|
||||
import {html} from "../../../../common/html.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 * as LinkUtil from "../../utils/link-util.js";
|
||||
import {html} from "../../../../common/html";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import {generateNodeFromHtml} from "../../components/base";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
import * as DomainUtil from "../../utils/domain-util";
|
||||
import * as LinkUtil from "../../utils/link-util";
|
||||
|
||||
interface NewServerFormProps {
|
||||
$root: Element;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type {DndSettings} from "../../../../common/dnd-util.js";
|
||||
import {html} from "../../../../common/html.js";
|
||||
import type {NavItem} from "../../../../common/types.js";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer.js";
|
||||
import type {DndSettings} from "../../../../common/dnd-util";
|
||||
import {html} from "../../../../common/html";
|
||||
import type {NavItem} from "../../../../common/types";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
|
||||
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";
|
||||
import {initGeneralSection} from "./general-section";
|
||||
import Nav from "./nav";
|
||||
import {initNetworkSection} from "./network-section";
|
||||
import {initServersSection} from "./servers-section";
|
||||
import {initShortcutsSection} from "./shortcuts-section";
|
||||
|
||||
export class PreferenceView {
|
||||
readonly $view: HTMLElement;
|
||||
|
||||
@@ -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 {ServerConf} 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";
|
||||
import * as Messages from "../../../../common/messages";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import type {ServerConf} from "../../../../common/types";
|
||||
import {generateNodeFromHtml} from "../../components/base";
|
||||
import {ipcRenderer} from "../../typed-ipc-renderer";
|
||||
import * as DomainUtil from "../../utils/domain-util";
|
||||
|
||||
interface ServerInfoFormProps {
|
||||
$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";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
|
||||
import {reloadApp} from "./base-section.js";
|
||||
import {initNewServerForm} from "./new-server-form.js";
|
||||
import {reloadApp} from "./base-section";
|
||||
import {initNewServerForm} from "./new-server-form";
|
||||
|
||||
interface ServersSectionProps {
|
||||
$root: Element;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {html} from "../../../../common/html.js";
|
||||
import * as t from "../../../../common/translation-util.js";
|
||||
import * as LinkUtil from "../../utils/link-util.js";
|
||||
import {html} from "../../../../common/html";
|
||||
import * as t from "../../../../common/translation-util";
|
||||
import * as LinkUtil from "../../utils/link-util";
|
||||
|
||||
interface ShortcutsSectionProps {
|
||||
$root: Element;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {contextBridge, webFrame} from "electron";
|
||||
import fs from "fs";
|
||||
|
||||
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";
|
||||
import * as NetworkError from "./pages/network";
|
||||
import {ipcRenderer} from "./typed-ipc-renderer";
|
||||
|
||||
contextBridge.exposeInMainWorld("raw_electron_bridge", electron_bridge);
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ import path from "path";
|
||||
|
||||
import {BrowserWindow, Menu, Tray, nativeImage} from "@electron/remote";
|
||||
|
||||
import * as ConfigUtil from "../../common/config-util.js";
|
||||
import type {RendererMessage} from "../../common/typed-ipc.js";
|
||||
import * as ConfigUtil from "../../common/config-util";
|
||||
import type {RendererMessage} from "../../common/typed-ipc";
|
||||
|
||||
import type {ServerManagerView} from "./main.js";
|
||||
import {ipcRenderer} from "./typed-ipc-renderer.js";
|
||||
import type {ServerManagerView} from "./main";
|
||||
import {ipcRenderer} from "./typed-ipc-renderer";
|
||||
|
||||
let tray: Electron.Tray | null = null;
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ import {JsonDB} from "node-json-db";
|
||||
import {DataError} from "node-json-db/dist/lib/Errors";
|
||||
import * as 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 type {ServerConf} from "../../../common/types.js";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer.js";
|
||||
import * as EnterpriseUtil from "../../../common/enterprise-util";
|
||||
import Logger from "../../../common/logger-util";
|
||||
import * as Messages from "../../../common/messages";
|
||||
import type {ServerConf} from "../../../common/types";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
|
||||
const logger = new Logger({
|
||||
file: "domain-util.log",
|
||||
|
||||
@@ -3,7 +3,7 @@ import fs from "fs";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
|
||||
import {html} from "../../../common/html.js";
|
||||
import {html} from "../../../common/html";
|
||||
|
||||
export function isUploadsUrl(server: string, url: URL): boolean {
|
||||
return url.origin === server && url.pathname.startsWith("/user_uploads/");
|
||||
|
||||
@@ -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";
|
||||
import Logger from "../../../common/logger-util";
|
||||
import type WebView from "../components/webview";
|
||||
import {ipcRenderer} from "../typed-ipc-renderer";
|
||||
|
||||
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";
|
||||
|
||||
export const connectivityError: string[] = [
|
||||
"ERR_INTERNET_DISCONNECTED",
|
||||
|
||||
Reference in New Issue
Block a user