diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-01-07 16:18:41 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-01-26 09:06:54 +0100 |
| commit | 420147939bcda37c7f1b0efa673326c59b96147b (patch) | |
| tree | 218b23b88ca1692dc90dcf17293cecb14809a9be | |
| parent | 841a4ba05c3fc2f2c46dd420b9c9868862290003 (diff) | |
| download | mullvadvpn-420147939bcda37c7f1b0efa673326c59b96147b.tar.xz mullvadvpn-420147939bcda37c7f1b0efa673326c59b96147b.zip | |
Move types used in ipc to ipc-types.ts
| -rw-r--r-- | gui/src/main/index.ts | 8 | ||||
| -rw-r--r-- | gui/src/main/window-controller.ts | 5 | ||||
| -rw-r--r-- | gui/src/renderer/app.tsx | 2 | ||||
| -rw-r--r-- | gui/src/shared/ipc-schema.ts | 5 | ||||
| -rw-r--r-- | gui/src/shared/ipc-types.ts | 10 |
5 files changed, 15 insertions, 15 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index fa522b66d4..56027141ec 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -39,6 +39,7 @@ import { SYSTEM_PREFERRED_LOCALE_KEY } from '../shared/gui-settings-state'; import log, { ConsoleOutput, Logger } from '../shared/logging'; import { LogLevel } from '../shared/logging-types'; import { IpcMainEventChannel } from './ipc-event-channel'; +import { ICurrentAppVersionInfo } from '../shared/ipc-types'; import { AccountExpiredNotificationProvider, CloseToAccountExpiryNotificationProvider, @@ -90,13 +91,6 @@ enum AppQuitStage { ready, } -export interface ICurrentAppVersionInfo { - gui: string; - daemon: string; - isConsistent: boolean; - isBeta: boolean; -} - type AccountVerification = { status: 'verified' } | { status: 'deferred'; error: Error }; class ApplicationMain { diff --git a/gui/src/main/window-controller.ts b/gui/src/main/window-controller.ts index bed94c37da..69ae6acb02 100644 --- a/gui/src/main/window-controller.ts +++ b/gui/src/main/window-controller.ts @@ -1,15 +1,12 @@ import { BrowserWindow, Display, screen, Tray, WebContents } from 'electron'; import { IpcMainEventChannel } from './ipc-event-channel'; +import { IWindowShapeParameters } from '../shared/ipc-types'; interface IPosition { x: number; y: number; } -export interface IWindowShapeParameters { - arrowPosition?: number; -} - interface IWindowPositioning { getPosition(window: BrowserWindow): IPosition; getWindowShapeParameters(window: BrowserWindow): IWindowShapeParameters; diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index 21f8568445..6d37e63279 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -15,7 +15,7 @@ import configureStore from './redux/store'; import userInterfaceActions from './redux/userinterface/actions'; import versionActions from './redux/version/actions'; -import { ICurrentAppVersionInfo } from '../main'; +import { ICurrentAppVersionInfo } from '../shared/ipc-types'; import { ILinuxSplitTunnelingApplication } from '../shared/application-types'; import { messages, relayLocations } from '../shared/gettext'; import { IGuiSettingsState, SYSTEM_PREFERRED_LOCALE_KEY } from '../shared/gui-settings-state'; diff --git a/gui/src/shared/ipc-schema.ts b/gui/src/shared/ipc-schema.ts index 046f938835..deead2557a 100644 --- a/gui/src/shared/ipc-schema.ts +++ b/gui/src/shared/ipc-schema.ts @@ -1,7 +1,5 @@ import { GetTextTranslations } from 'gettext-parser'; -import { ICurrentAppVersionInfo } from '../main/index'; -import { IWindowShapeParameters } from '../main/window-controller'; -import { ILinuxSplitTunnelingApplication } from '../shared/application-types'; +import { ILinuxSplitTunnelingApplication } from './application-types'; import { AccountToken, BridgeSettings, @@ -26,6 +24,7 @@ interface ILogEntry { message: string; } import { invoke, invokeSync, notifyRenderer, send } from './ipc-helpers'; +import { ICurrentAppVersionInfo, IWindowShapeParameters } from './ipc-types'; export interface ITranslations { locale: string; diff --git a/gui/src/shared/ipc-types.ts b/gui/src/shared/ipc-types.ts new file mode 100644 index 0000000000..7781551ed5 --- /dev/null +++ b/gui/src/shared/ipc-types.ts @@ -0,0 +1,10 @@ +export interface ICurrentAppVersionInfo { + gui: string; + daemon: string; + isConsistent: boolean; + isBeta: boolean; +} + +export interface IWindowShapeParameters { + arrowPosition?: number; +} |
