diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-03-05 12:13:57 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-03-07 13:48:30 +0100 |
| commit | afca6149d3d385ec1b95dcd77d9e75a08d874c31 (patch) | |
| tree | ac504c98e4b0cc3f21b1c5123ce6df714a5922ee /gui | |
| parent | a9d99644c6ace3989468b6b29ac42edd3f0b5d1f (diff) | |
| download | mullvadvpn-afca6149d3d385ec1b95dcd77d9e75a08d874c31.tar.xz mullvadvpn-afca6149d3d385ec1b95dcd77d9e75a08d874c31.zip | |
Remove isOnline flag
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/main/errors.ts | 6 | ||||
| -rw-r--r-- | gui/src/renderer/redux/connection/actions.ts | 26 | ||||
| -rw-r--r-- | gui/src/renderer/redux/connection/reducers.ts | 8 |
3 files changed, 1 insertions, 39 deletions
diff --git a/gui/src/main/errors.ts b/gui/src/main/errors.ts index f13b99e3e9..85adf965a5 100644 --- a/gui/src/main/errors.ts +++ b/gui/src/main/errors.ts @@ -4,12 +4,6 @@ export class NoCreditError extends Error { } } -export class NoInternetError extends Error { - constructor() { - super('Internet connectivity is currently unavailable'); - } -} - export class NoDaemonError extends Error { constructor() { super('Could not connect to Mullvad daemon'); diff --git a/gui/src/renderer/redux/connection/actions.ts b/gui/src/renderer/redux/connection/actions.ts index ff34b20e11..5966635a2e 100644 --- a/gui/src/renderer/redux/connection/actions.ts +++ b/gui/src/renderer/redux/connection/actions.ts @@ -34,23 +34,13 @@ interface INewLocationAction { newLocation: ILocation; } -interface IOnlineAction { - type: 'ONLINE'; -} - -interface IOfflineAction { - type: 'OFFLINE'; -} - export type ConnectionAction = | INewLocationAction | IConnectingAction | IConnectedAction | IDisconnectedAction | IDisconnectingAction - | IBlockedAction - | IOnlineAction - | IOfflineAction; + | IBlockedAction; function connecting(tunnelEndpoint?: ITunnelEndpoint): IConnectingAction { return { @@ -93,18 +83,6 @@ function newLocation(location: ILocation): INewLocationAction { }; } -function online(): IOnlineAction { - return { - type: 'ONLINE', - }; -} - -function offline(): IOfflineAction { - return { - type: 'OFFLINE', - }; -} - export default { newLocation, connecting, @@ -112,6 +90,4 @@ export default { disconnected, disconnecting, blocked, - online, - offline, }; diff --git a/gui/src/renderer/redux/connection/reducers.ts b/gui/src/renderer/redux/connection/reducers.ts index af92e0fd6f..3d1098b9d2 100644 --- a/gui/src/renderer/redux/connection/reducers.ts +++ b/gui/src/renderer/redux/connection/reducers.ts @@ -3,7 +3,6 @@ import { ReduxAction } from '../store'; export interface IConnectionReduxState { status: TunnelStateTransition; - isOnline: boolean; isBlocked: boolean; ip?: Ip; hostname?: string; @@ -15,7 +14,6 @@ export interface IConnectionReduxState { const initialState: IConnectionReduxState = { status: { state: 'disconnected' }, - isOnline: true, isBlocked: false, ip: undefined, hostname: undefined, @@ -64,12 +62,6 @@ export default function( isBlocked: action.reason.reason !== 'set_firewall_policy_error', }; - case 'ONLINE': - return { ...state, isOnline: true }; - - case 'OFFLINE': - return { ...state, isOnline: false }; - default: return state; } |
