mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-19 14:08:31 +00:00
xo: Sort imports with import/order.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
import {app, dialog, session} from 'electron';
|
import {app, dialog, session} from 'electron';
|
||||||
import {UpdateDownloadedEvent, UpdateInfo, autoUpdater} from 'electron-updater';
|
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
import {linuxUpdateNotification} from './linuxupdater'; // Required only in case of linux
|
|
||||||
|
|
||||||
import log from 'electron-log';
|
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
|
import log from 'electron-log';
|
||||||
|
import {UpdateDownloadedEvent, UpdateInfo, autoUpdater} from 'electron-updater';
|
||||||
|
|
||||||
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
||||||
import * as LinkUtil from '../renderer/js/utils/link-util';
|
import * as LinkUtil from '../renderer/js/utils/link-util';
|
||||||
|
|
||||||
|
import {linuxUpdateNotification} from './linuxupdater'; // Required only in case of linux
|
||||||
|
|
||||||
const sleep = util.promisify(setTimeout);
|
const sleep = util.promisify(setTimeout);
|
||||||
|
|
||||||
export async function appUpdater(updateFromMenu = false): Promise<void> {
|
export async function appUpdater(updateFromMenu = false): Promise<void> {
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
import {sentryInit} from '../renderer/js/utils/sentry-util';
|
|
||||||
import {appUpdater} from './autoupdater';
|
import electron, {app, dialog, ipcMain, session} from 'electron';
|
||||||
import {setAutoLaunch} from './startup';
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
import windowStateKeeper from 'electron-window-state';
|
import windowStateKeeper from 'electron-window-state';
|
||||||
import path from 'path';
|
|
||||||
import fs from 'fs';
|
|
||||||
import electron, {app, dialog, ipcMain, session} from 'electron';
|
|
||||||
|
|
||||||
import * as AppMenu from './menu';
|
|
||||||
import * as BadgeSettings from '../renderer/js/pages/preference/badge-settings';
|
import * as BadgeSettings from '../renderer/js/pages/preference/badge-settings';
|
||||||
import * as CertificateUtil from '../renderer/js/utils/certificate-util';
|
import * as CertificateUtil from '../renderer/js/utils/certificate-util';
|
||||||
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
||||||
import * as ProxyUtil from '../renderer/js/utils/proxy-util';
|
import * as ProxyUtil from '../renderer/js/utils/proxy-util';
|
||||||
|
import {sentryInit} from '../renderer/js/utils/sentry-util';
|
||||||
|
|
||||||
|
import {appUpdater} from './autoupdater';
|
||||||
|
import * as AppMenu from './menu';
|
||||||
import {_getServerSettings, _saveServerIcon, _isOnline} from './request';
|
import {_getServerSettings, _saveServerIcon, _isOnline} from './request';
|
||||||
|
import {setAutoLaunch} from './startup';
|
||||||
|
|
||||||
let mainWindowState: windowStateKeeper.State;
|
let mainWindowState: windowStateKeeper.State;
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ import {app, Notification, net} from 'electron';
|
|||||||
|
|
||||||
import getStream from 'get-stream';
|
import getStream from 'get-stream';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
|
|
||||||
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
||||||
import * as LinuxUpdateUtil from '../renderer/js/utils/linux-update-util';
|
import * as LinuxUpdateUtil from '../renderer/js/utils/linux-update-util';
|
||||||
import Logger from '../renderer/js/utils/logger-util';
|
import Logger from '../renderer/js/utils/logger-util';
|
||||||
|
|
||||||
import {fetchResponse} from './request';
|
import {fetchResponse} from './request';
|
||||||
|
|
||||||
const logger = new Logger({
|
const logger = new Logger({
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
import {app, shell, BrowserWindow, Menu} from 'electron';
|
import {app, shell, BrowserWindow, Menu} from 'electron';
|
||||||
import {appUpdater} from './autoupdater';
|
|
||||||
|
|
||||||
import AdmZip from 'adm-zip';
|
import AdmZip from 'adm-zip';
|
||||||
import * as DNDUtil from '../renderer/js/utils/dnd-util';
|
|
||||||
|
import type {ServerOrFunctionalTab} from '../renderer/js/main';
|
||||||
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
||||||
|
import * as DNDUtil from '../renderer/js/utils/dnd-util';
|
||||||
import * as LinkUtil from '../renderer/js/utils/link-util';
|
import * as LinkUtil from '../renderer/js/utils/link-util';
|
||||||
import * as t from '../renderer/js/utils/translation-util';
|
import * as t from '../renderer/js/utils/translation-util';
|
||||||
import type {ServerOrFunctionalTab} from '../renderer/js/main';
|
|
||||||
|
import {appUpdater} from './autoupdater';
|
||||||
|
|
||||||
export interface MenuProps {
|
export interface MenuProps {
|
||||||
tabs: ServerOrFunctionalTab[];
|
tabs: ServerOrFunctionalTab[];
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ import fs from 'fs';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import stream from 'stream';
|
import stream from 'stream';
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
import * as Messages from '../resources/messages';
|
|
||||||
import Logger from '../renderer/js/utils/logger-util';
|
|
||||||
import {ServerConf} from '../renderer/js/utils/domain-util';
|
|
||||||
import escape from 'escape-html';
|
import escape from 'escape-html';
|
||||||
import getStream from 'get-stream';
|
import getStream from 'get-stream';
|
||||||
|
|
||||||
|
import {ServerConf} from '../renderer/js/utils/domain-util';
|
||||||
|
import Logger from '../renderer/js/utils/logger-util';
|
||||||
|
import * as Messages from '../resources/messages';
|
||||||
|
|
||||||
export async function fetchResponse(request: ClientRequest): Promise<IncomingMessage> {
|
export async function fetchResponse(request: ClientRequest): Promise<IncomingMessage> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
request.on('response', resolve);
|
request.on('response', resolve);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {app} from 'electron';
|
|||||||
|
|
||||||
import AutoLaunch from 'auto-launch';
|
import AutoLaunch from 'auto-launch';
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
|
|
||||||
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
import * as ConfigUtil from '../renderer/js/utils/config-util';
|
||||||
|
|
||||||
export const setAutoLaunch = async (AutoLaunchValue: boolean): Promise<void> => {
|
export const setAutoLaunch = async (AutoLaunchValue: boolean): Promise<void> => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {clipboard} from 'electron';
|
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
|
import {clipboard} from 'electron';
|
||||||
|
|
||||||
// This helper is exposed via electron_bridge for use in the social
|
// This helper is exposed via electron_bridge for use in the social
|
||||||
// login flow.
|
// login flow.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {remote, ContextMenuParams} from 'electron';
|
import {remote, ContextMenuParams} from 'electron';
|
||||||
|
|
||||||
import * as t from '../utils/translation-util';
|
import * as t from '../utils/translation-util';
|
||||||
const {clipboard, Menu} = remote;
|
const {clipboard, Menu} = remote;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import {ipcRenderer, remote} from 'electron';
|
import {ipcRenderer, remote} from 'electron';
|
||||||
|
|
||||||
import * as LinkUtil from '../utils/link-util';
|
|
||||||
import * as ConfigUtil from '../utils/config-util';
|
import * as ConfigUtil from '../utils/config-util';
|
||||||
|
import * as LinkUtil from '../utils/link-util';
|
||||||
|
|
||||||
import type WebView from './webview';
|
import type WebView from './webview';
|
||||||
|
|
||||||
const {shell, app} = remote;
|
const {shell, app} = remote;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import Tab, {TabProps} from './tab';
|
|
||||||
import * as SystemUtil from '../utils/system-util';
|
import * as SystemUtil from '../utils/system-util';
|
||||||
|
|
||||||
|
import Tab, {TabProps} from './tab';
|
||||||
|
|
||||||
export default class ServerTab extends Tab {
|
export default class ServerTab extends Tab {
|
||||||
$badge: Element;
|
$badge: Element;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import WebView from './webview';
|
|
||||||
import BaseComponent from './base';
|
import BaseComponent from './base';
|
||||||
|
import WebView from './webview';
|
||||||
|
|
||||||
export interface TabProps {
|
export interface TabProps {
|
||||||
role: string;
|
role: string;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import {ipcRenderer, remote} from 'electron';
|
import {ipcRenderer, remote} from 'electron';
|
||||||
|
|
||||||
import path from 'path';
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
import * as ConfigUtil from '../utils/config-util';
|
import * as ConfigUtil from '../utils/config-util';
|
||||||
import * as SystemUtil from '../utils/system-util';
|
import * as SystemUtil from '../utils/system-util';
|
||||||
|
|
||||||
import BaseComponent from './base';
|
import BaseComponent from './base';
|
||||||
import handleExternalLink from './handle-external-link';
|
|
||||||
import {contextMenu} from './context-menu';
|
import {contextMenu} from './context-menu';
|
||||||
|
import handleExternalLink from './handle-external-link';
|
||||||
|
|
||||||
const {app, dialog} = remote;
|
const {app, dialog} = remote;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import {EventEmitter} from 'events';
|
import {EventEmitter} from 'events';
|
||||||
|
|
||||||
import {ClipboardDecrypterImpl} from './clipboard-decrypter';
|
import {ClipboardDecrypterImpl} from './clipboard-decrypter';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {remote} from 'electron';
|
import {remote} from 'electron';
|
||||||
import SendFeedback from '@electron-elements/send-feedback';
|
|
||||||
|
|
||||||
import path from 'path';
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
import SendFeedback from '@electron-elements/send-feedback';
|
||||||
|
|
||||||
const {app} = remote;
|
const {app} = remote;
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,29 @@
|
|||||||
import {ipcRenderer, remote, clipboard} from 'electron';
|
import {ipcRenderer, remote, clipboard} from 'electron';
|
||||||
import {feedbackHolder} from './feedback';
|
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import escape from 'escape-html';
|
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
const {session, app, Menu, dialog} = remote;
|
import escape from 'escape-html';
|
||||||
|
|
||||||
|
import * as Messages from '../../resources/messages';
|
||||||
|
|
||||||
|
import FunctionalTab from './components/functional-tab';
|
||||||
|
import ServerTab from './components/server-tab';
|
||||||
|
import WebView from './components/webview';
|
||||||
|
import {feedbackHolder} from './feedback';
|
||||||
|
import * as CommonUtil from './utils/common-util';
|
||||||
|
import * as ConfigUtil from './utils/config-util';
|
||||||
|
import * as DNDUtil from './utils/dnd-util';
|
||||||
|
import type {DNDSettings} from './utils/dnd-util';
|
||||||
|
import * as DomainUtil from './utils/domain-util';
|
||||||
|
import * as EnterpriseUtil from './utils/enterprise-util';
|
||||||
|
import * as LinkUtil from './utils/link-util';
|
||||||
|
import Logger from './utils/logger-util';
|
||||||
|
import ReconnectUtil from './utils/reconnect-util';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-unassigned-import
|
// eslint-disable-next-line import/no-unassigned-import
|
||||||
import './tray';
|
import './tray';
|
||||||
|
|
||||||
import * as DomainUtil from './utils/domain-util';
|
const {session, app, Menu, dialog} = remote;
|
||||||
import WebView from './components/webview';
|
|
||||||
import ServerTab from './components/server-tab';
|
|
||||||
import FunctionalTab from './components/functional-tab';
|
|
||||||
import * as ConfigUtil from './utils/config-util';
|
|
||||||
import * as DNDUtil from './utils/dnd-util';
|
|
||||||
import ReconnectUtil from './utils/reconnect-util';
|
|
||||||
import Logger from './utils/logger-util';
|
|
||||||
import * as CommonUtil from './utils/common-util';
|
|
||||||
import * as EnterpriseUtil from './utils/enterprise-util';
|
|
||||||
import * as LinkUtil from './utils/link-util';
|
|
||||||
import * as Messages from '../../resources/messages';
|
|
||||||
import type {DNDSettings} from './utils/dnd-util';
|
|
||||||
|
|
||||||
interface FunctionalTabProps {
|
interface FunctionalTabProps {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
|
import MacNotifier from 'node-mac-notifier';
|
||||||
|
|
||||||
|
import electron_bridge from '../electron-bridge';
|
||||||
|
import * as ConfigUtil from '../utils/config-util';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
appId, customReply, focusCurrentServer, parseReply
|
appId, customReply, focusCurrentServer, parseReply
|
||||||
} from './helpers';
|
} from './helpers';
|
||||||
|
|
||||||
import MacNotifier from 'node-mac-notifier';
|
|
||||||
import * as ConfigUtil from '../utils/config-util';
|
|
||||||
import electron_bridge from '../electron-bridge';
|
|
||||||
|
|
||||||
type ReplyHandler = (response: string) => void;
|
type ReplyHandler = (response: string) => void;
|
||||||
type ClickHandler = () => void;
|
type ClickHandler = () => void;
|
||||||
let replyHandler: ReplyHandler;
|
let replyHandler: ReplyHandler;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
import {focusCurrentServer} from './helpers';
|
|
||||||
|
|
||||||
import * as ConfigUtil from '../utils/config-util';
|
import * as ConfigUtil from '../utils/config-util';
|
||||||
|
|
||||||
|
import {focusCurrentServer} from './helpers';
|
||||||
|
|
||||||
const NativeNotification = window.Notification;
|
const NativeNotification = window.Notification;
|
||||||
export default class BaseNotification extends NativeNotification {
|
export default class BaseNotification extends NativeNotification {
|
||||||
constructor(title: string, options: NotificationOptions) {
|
constructor(title: string, options: NotificationOptions) {
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import {remote} from 'electron';
|
import {remote} from 'electron';
|
||||||
|
|
||||||
import electron_bridge from '../electron-bridge';
|
import electron_bridge from '../electron-bridge';
|
||||||
import {appId, loadBots} from './helpers';
|
|
||||||
|
|
||||||
import DefaultNotification from './default-notification';
|
import DefaultNotification from './default-notification';
|
||||||
|
import {appId, loadBots} from './helpers';
|
||||||
|
|
||||||
const {app} = remote;
|
const {app} = remote;
|
||||||
|
|
||||||
// From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid
|
// From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use-strict';
|
'use-strict';
|
||||||
|
|
||||||
import {remote, OpenDialogOptions} from 'electron';
|
import {remote, OpenDialogOptions} from 'electron';
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import BaseComponent from '../../components/base';
|
import BaseComponent from '../../components/base';
|
||||||
import * as CertificateUtil from '../../utils/certificate-util';
|
import * as CertificateUtil from '../../utils/certificate-util';
|
||||||
import * as DomainUtil from '../../utils/domain-util';
|
import * as DomainUtil from '../../utils/domain-util';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import escape from 'escape-html';
|
import escape from 'escape-html';
|
||||||
|
|
||||||
import BaseComponent from '../../components/base';
|
import BaseComponent from '../../components/base';
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import BaseSection from './base-section';
|
|
||||||
import * as DomainUtil from '../../utils/domain-util';
|
import * as DomainUtil from '../../utils/domain-util';
|
||||||
import ServerInfoForm from './server-info-form';
|
|
||||||
import AddCertificate from './add-certificate';
|
|
||||||
import FindAccounts from './find-accounts';
|
|
||||||
import * as t from '../../utils/translation-util';
|
import * as t from '../../utils/translation-util';
|
||||||
|
|
||||||
|
import AddCertificate from './add-certificate';
|
||||||
|
import BaseSection from './base-section';
|
||||||
|
import FindAccounts from './find-accounts';
|
||||||
|
import ServerInfoForm from './server-info-form';
|
||||||
|
|
||||||
interface ConnectedOrgSectionProps {
|
interface ConnectedOrgSectionProps {
|
||||||
$root: Element;
|
$root: Element;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
import {ipcRenderer, remote, OpenDialogOptions} from 'electron';
|
import {ipcRenderer, remote, OpenDialogOptions} from 'electron';
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
import Tagify from '@yaireo/tagify';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
import ISO6391 from 'iso-639-1';
|
||||||
|
|
||||||
const {app, dialog, session} = remote;
|
import supportedLocales from '../../../../translations/supported-locales.json';
|
||||||
const currentBrowserWindow = remote.getCurrentWindow();
|
|
||||||
|
|
||||||
import BaseSection from './base-section';
|
|
||||||
import * as ConfigUtil from '../../utils/config-util';
|
import * as ConfigUtil from '../../utils/config-util';
|
||||||
import * as EnterpriseUtil from '../../utils/enterprise-util';
|
import * as EnterpriseUtil from '../../utils/enterprise-util';
|
||||||
import * as t from '../../utils/translation-util';
|
import * as t from '../../utils/translation-util';
|
||||||
import supportedLocales from '../../../../translations/supported-locales.json';
|
|
||||||
import Tagify from '@yaireo/tagify';
|
import BaseSection from './base-section';
|
||||||
import ISO6391 from 'iso-639-1';
|
|
||||||
|
const {app, dialog, session} = remote;
|
||||||
|
const currentBrowserWindow = remote.getCurrentWindow();
|
||||||
|
|
||||||
interface GeneralSectionProps {
|
interface GeneralSectionProps {
|
||||||
$root: Element;
|
$root: Element;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import BaseSection from './base-section';
|
|
||||||
import * as ConfigUtil from '../../utils/config-util';
|
import * as ConfigUtil from '../../utils/config-util';
|
||||||
import * as t from '../../utils/translation-util';
|
import * as t from '../../utils/translation-util';
|
||||||
|
|
||||||
|
import BaseSection from './base-section';
|
||||||
|
|
||||||
interface NetworkSectionProps {
|
interface NetworkSectionProps {
|
||||||
$root: Element;
|
$root: Element;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import BaseComponent from '../../components/base';
|
import BaseComponent from '../../components/base';
|
||||||
import Nav from './nav';
|
|
||||||
import ServersSection from './servers-section';
|
|
||||||
import GeneralSection from './general-section';
|
|
||||||
import NetworkSection from './network-section';
|
|
||||||
import ConnectedOrgSection from './connected-org-section';
|
|
||||||
import ShortcutsSection from './shortcuts-section';
|
|
||||||
import type {DNDSettings} from '../../utils/dnd-util';
|
import type {DNDSettings} from '../../utils/dnd-util';
|
||||||
|
|
||||||
|
import ConnectedOrgSection from './connected-org-section';
|
||||||
|
import GeneralSection from './general-section';
|
||||||
|
import Nav from './nav';
|
||||||
|
import NetworkSection from './network-section';
|
||||||
|
import ServersSection from './servers-section';
|
||||||
|
import ShortcutsSection from './shortcuts-section';
|
||||||
|
|
||||||
type Section = ServersSection | GeneralSection | NetworkSection | ConnectedOrgSection | ShortcutsSection;
|
type Section = ServersSection | GeneralSection | NetworkSection | ConnectedOrgSection | ShortcutsSection;
|
||||||
|
|
||||||
export default class PreferenceView extends BaseComponent {
|
export default class PreferenceView extends BaseComponent {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {remote, ipcRenderer} from 'electron';
|
import {remote, ipcRenderer} from 'electron';
|
||||||
|
|
||||||
|
import * as Messages from '../../../../resources/messages';
|
||||||
import BaseComponent from '../../components/base';
|
import BaseComponent from '../../components/base';
|
||||||
import * as DomainUtil from '../../utils/domain-util';
|
import * as DomainUtil from '../../utils/domain-util';
|
||||||
import * as Messages from '../../../../resources/messages';
|
|
||||||
import * as t from '../../utils/translation-util';
|
import * as t from '../../utils/translation-util';
|
||||||
|
|
||||||
const {dialog} = remote;
|
const {dialog} = remote;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
import * as t from '../../utils/translation-util';
|
||||||
|
|
||||||
import BaseSection from './base-section';
|
import BaseSection from './base-section';
|
||||||
import NewServerForm from './new-server-form';
|
import NewServerForm from './new-server-form';
|
||||||
import * as t from '../../utils/translation-util';
|
|
||||||
|
|
||||||
interface ServersSectionProps {
|
interface ServersSectionProps {
|
||||||
$root: Element;
|
$root: Element;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import BaseSection from './base-section';
|
|
||||||
import * as LinkUtil from '../../utils/link-util';
|
import * as LinkUtil from '../../utils/link-util';
|
||||||
import * as t from '../../utils/translation-util';
|
import * as t from '../../utils/translation-util';
|
||||||
|
|
||||||
|
import BaseSection from './base-section';
|
||||||
|
|
||||||
interface ShortcutsSectionProps {
|
interface ShortcutsSectionProps {
|
||||||
$root: Element;
|
$root: Element;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import fs from 'fs';
|
|||||||
|
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
|
|
||||||
|
import electron_bridge from './electron-bridge';
|
||||||
import * as NetworkError from './pages/network';
|
import * as NetworkError from './pages/network';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-unassigned-import
|
// eslint-disable-next-line import/no-unassigned-import
|
||||||
@@ -12,7 +13,6 @@ import './notification';
|
|||||||
// eslint-disable-next-line import/no-unassigned-import
|
// eslint-disable-next-line import/no-unassigned-import
|
||||||
import './shared/preventdrag';
|
import './shared/preventdrag';
|
||||||
|
|
||||||
import electron_bridge from './electron-bridge';
|
|
||||||
contextBridge.exposeInMainWorld('raw_electron_bridge', electron_bridge);
|
contextBridge.exposeInMainWorld('raw_electron_bridge', electron_bridge);
|
||||||
|
|
||||||
ipcRenderer.on('logout', () => {
|
ipcRenderer.on('logout', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {ipcRenderer, remote, WebviewTag, NativeImage} from 'electron';
|
import {ipcRenderer, remote, WebviewTag, NativeImage} from 'electron';
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import * as ConfigUtil from './utils/config-util';
|
import * as ConfigUtil from './utils/config-util';
|
||||||
|
|
||||||
const {Tray, Menu, nativeImage, BrowserWindow} = remote;
|
const {Tray, Menu, nativeImage, BrowserWindow} = remote;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import electron from 'electron';
|
import electron from 'electron';
|
||||||
import {JsonDB} from 'node-json-db';
|
|
||||||
import {initSetUp} from './default-util';
|
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
import {JsonDB} from 'node-json-db';
|
||||||
|
|
||||||
|
import {initSetUp} from './default-util';
|
||||||
import Logger from './logger-util';
|
import Logger from './logger-util';
|
||||||
|
|
||||||
const {app, dialog} =
|
const {app, dialog} =
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import {JsonDB} from 'node-json-db';
|
import electron from 'electron';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import electron from 'electron';
|
|
||||||
import Logger from './logger-util';
|
import {JsonDB} from 'node-json-db';
|
||||||
|
|
||||||
import * as EnterpriseUtil from './enterprise-util';
|
import * as EnterpriseUtil from './enterprise-util';
|
||||||
|
import Logger from './logger-util';
|
||||||
|
|
||||||
const logger = new Logger({
|
const logger = new Logger({
|
||||||
file: 'config-util.log',
|
file: 'config-util.log',
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import {JsonDB} from 'node-json-db';
|
import {remote, ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import Logger from './logger-util';
|
|
||||||
import {remote, ipcRenderer} from 'electron';
|
import {JsonDB} from 'node-json-db';
|
||||||
|
|
||||||
|
import * as Messages from '../../../resources/messages';
|
||||||
|
|
||||||
import * as EnterpriseUtil from './enterprise-util';
|
import * as EnterpriseUtil from './enterprise-util';
|
||||||
import * as Messages from '../../../resources/messages';
|
import Logger from './logger-util';
|
||||||
|
|
||||||
const {app, dialog} = remote;
|
const {app, dialog} = remote;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import {shell} from 'electron';
|
import {shell} from 'electron';
|
||||||
import escape from 'escape-html';
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
import escape from 'escape-html';
|
||||||
|
|
||||||
export function isUploadsUrl(server: string, url: URL): boolean {
|
export function isUploadsUrl(server: string, url: URL): boolean {
|
||||||
return url.origin === server && url.pathname.startsWith('/user_uploads/');
|
return url.origin === server && url.pathname.startsWith('/user_uploads/');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import {JsonDB} from 'node-json-db';
|
import electron from 'electron';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import electron from 'electron';
|
|
||||||
|
import {JsonDB} from 'node-json-db';
|
||||||
|
|
||||||
import Logger from './logger-util';
|
import Logger from './logger-util';
|
||||||
|
|
||||||
const remote =
|
const remote =
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import {Console} from 'console'; // eslint-disable-line node/prefer-global/console
|
import {Console} from 'console'; // eslint-disable-line node/prefer-global/console
|
||||||
import {initSetUp} from './default-util';
|
import electron from 'electron';
|
||||||
import {sentryInit, captureException} from './sentry-util';
|
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
import electron from 'electron';
|
|
||||||
|
import {initSetUp} from './default-util';
|
||||||
|
import {sentryInit, captureException} from './sentry-util';
|
||||||
|
|
||||||
interface LoggerOptions {
|
interface LoggerOptions {
|
||||||
timestamp?: true | (() => string);
|
timestamp?: true | (() => string);
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import type WebView from '../components/webview';
|
|
||||||
import backoff from 'backoff';
|
import backoff from 'backoff';
|
||||||
|
|
||||||
|
import type WebView from '../components/webview';
|
||||||
|
|
||||||
import Logger from './logger-util';
|
import Logger from './logger-util';
|
||||||
|
|
||||||
const logger = new Logger({
|
const logger = new Logger({
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {init} from '@sentry/electron';
|
import {init} from '@sentry/electron';
|
||||||
|
|
||||||
import isDev from 'electron-is-dev';
|
import isDev from 'electron-is-dev';
|
||||||
|
|
||||||
export const sentryInit = (): void => {
|
export const sentryInit = (): void => {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {ipcRenderer} from 'electron';
|
import {ipcRenderer} from 'electron';
|
||||||
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
|
||||||
export const connectivityERR: string[] = [
|
export const connectivityERR: string[] = [
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import i18n from 'i18n';
|
import i18n from 'i18n';
|
||||||
|
|
||||||
import * as ConfigUtil from './config-util';
|
import * as ConfigUtil from './config-util';
|
||||||
|
|
||||||
i18n.configure({
|
i18n.configure({
|
||||||
|
|||||||
14
gulpfile.js
14
gulpfile.js
@@ -1,16 +1,16 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const gulp = require('gulp');
|
const {execSync} = require('child_process');
|
||||||
|
|
||||||
const electron = require('electron-connect').server.create({
|
const electron = require('electron-connect').server.create({
|
||||||
verbose: true
|
verbose: true
|
||||||
});
|
});
|
||||||
const tape = require('gulp-tape');
|
|
||||||
const tapColorize = require('tap-colorize');
|
|
||||||
const ts = require('gulp-typescript');
|
|
||||||
const tsProject = ts.createProject('tsconfig.json');
|
|
||||||
|
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
const {execSync} = require('child_process');
|
const gulp = require('gulp');
|
||||||
|
const tape = require('gulp-tape');
|
||||||
|
const ts = require('gulp-typescript');
|
||||||
|
const tapColorize = require('tap-colorize');
|
||||||
|
|
||||||
|
const tsProject = ts.createProject('tsconfig.json');
|
||||||
const baseFilePattern = 'app/+(main|renderer)/**/*';
|
const baseFilePattern = 'app/+(main|renderer)/**/*';
|
||||||
const globOptions = {cwd: __dirname};
|
const globOptions = {cwd: __dirname};
|
||||||
const jsFiles = glob.sync(baseFilePattern + '.js', globOptions);
|
const jsFiles = glob.sync(baseFilePattern + '.js', globOptions);
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -204,6 +204,16 @@
|
|||||||
"@typescript-eslint/no-dynamic-delete": "off",
|
"@typescript-eslint/no-dynamic-delete": "off",
|
||||||
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
||||||
"arrow-body-style": "error",
|
"arrow-body-style": "error",
|
||||||
|
"import/first": "error",
|
||||||
|
"import/order": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"alphabetize": {
|
||||||
|
"order": "asc"
|
||||||
|
},
|
||||||
|
"newlines-between": "always"
|
||||||
|
}
|
||||||
|
],
|
||||||
"import/unambiguous": "error",
|
"import/unambiguous": "error",
|
||||||
"max-lines": [
|
"max-lines": [
|
||||||
"warn",
|
"warn",
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const dotenv = require('dotenv');
|
const dotenv = require('dotenv');
|
||||||
|
const {notarize} = require('electron-notarize');
|
||||||
|
|
||||||
dotenv.config({path: path.join(__dirname, '/../.env')});
|
dotenv.config({path: path.join(__dirname, '/../.env')});
|
||||||
|
|
||||||
const {notarize} = require('electron-notarize');
|
|
||||||
|
|
||||||
exports.default = async function (context) {
|
exports.default = async function (context) {
|
||||||
const {electronPlatformName, appOutDir} = context;
|
const {electronPlatformName, appOutDir} = context;
|
||||||
if (electronPlatformName !== 'darwin') {
|
if (electronPlatformName !== 'darwin') {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const test = require('tape');
|
const test = require('tape');
|
||||||
|
|
||||||
const setup = require('./setup');
|
const setup = require('./setup');
|
||||||
|
|
||||||
test('app runs', async t => {
|
test('app runs', async t => {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const {Application} = require('spectron');
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const rimraf = require('rimraf');
|
const rimraf = require('rimraf');
|
||||||
|
const {Application} = require('spectron');
|
||||||
|
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const test = require('tape');
|
const test = require('tape');
|
||||||
|
|
||||||
const setup = require('./setup');
|
const setup = require('./setup');
|
||||||
|
|
||||||
test('add-organization', async t => {
|
test('add-organization', async t => {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const test = require('tape');
|
const test = require('tape');
|
||||||
|
|
||||||
const setup = require('./setup');
|
const setup = require('./setup');
|
||||||
|
|
||||||
// Create new org link should open in the default browser [WIP]
|
// Create new org link should open in the default browser [WIP]
|
||||||
|
|||||||
Reference in New Issue
Block a user