summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-09-26 16:16:52 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-11-30 10:36:19 +0100
commit6f15a08566c716237b0b51bced94ee849f899ca2 (patch)
tree64a996400740663ee733fcbadab12aa241cfdc38 /gui/src/renderer
parent3fd327525882bc6459ed425de67ed687c949ef3f (diff)
downloadmullvadvpn-6f15a08566c716237b0b51bced94ee849f899ca2.tar.xz
mullvadvpn-6f15a08566c716237b0b51bced94ee849f899ca2.zip
Update logic to work with new ErrorState structures
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx2
-rw-r--r--gui/src/renderer/components/Connect.tsx2
-rw-r--r--gui/src/renderer/components/HeaderBar.tsx2
-rw-r--r--gui/src/renderer/components/NotificationArea.tsx2
-rw-r--r--gui/src/renderer/components/TunnelControl.tsx2
-rw-r--r--gui/src/renderer/redux/connection/actions.ts6
6 files changed, 8 insertions, 8 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index ae7cdec881..e78462041b 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -754,7 +754,7 @@ export default class AppRenderer {
break;
case 'error':
- actions.updateBlockState(!tunnelState.details.blockFailure);
+ actions.updateBlockState(!tunnelState.details.blockingError);
break;
}
}
diff --git a/gui/src/renderer/components/Connect.tsx b/gui/src/renderer/components/Connect.tsx
index 492fcc3fc9..79de3c5242 100644
--- a/gui/src/renderer/components/Connect.tsx
+++ b/gui/src/renderer/components/Connect.tsx
@@ -97,7 +97,7 @@ export default function Connect() {
case 'connected':
return MarkerStyle.secure;
case 'error':
- return !connection.status.details.blockFailure ? MarkerStyle.secure : MarkerStyle.unsecure;
+ return !connection.status.details.blockingError ? MarkerStyle.secure : MarkerStyle.unsecure;
case 'disconnected':
return MarkerStyle.unsecure;
case 'disconnecting':
diff --git a/gui/src/renderer/components/HeaderBar.tsx b/gui/src/renderer/components/HeaderBar.tsx
index 3cf96df6fc..7c436e3c16 100644
--- a/gui/src/renderer/components/HeaderBar.tsx
+++ b/gui/src/renderer/components/HeaderBar.tsx
@@ -139,7 +139,7 @@ export function calculateHeaderBarStyle(tunnelState: TunnelState): HeaderBarStyl
case 'connected':
return HeaderBarStyle.success;
case 'error':
- return !tunnelState.details.blockFailure ? HeaderBarStyle.success : HeaderBarStyle.error;
+ return !tunnelState.details.blockingError ? HeaderBarStyle.success : HeaderBarStyle.error;
case 'disconnecting':
switch (tunnelState.details) {
case 'block':
diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx
index acd1aaf2df..317cc1e923 100644
--- a/gui/src/renderer/components/NotificationArea.tsx
+++ b/gui/src/renderer/components/NotificationArea.tsx
@@ -51,7 +51,7 @@ export default function NotificationArea(props: IProps) {
blockWhenDisconnected,
hasExcludedApps,
}),
- new ErrorNotificationProvider({ tunnelState, accountExpiry, hasExcludedApps }),
+ new ErrorNotificationProvider({ tunnelState, hasExcludedApps }),
new InconsistentVersionNotificationProvider({ consistent: version.consistent }),
new UnsupportedVersionNotificationProvider(version),
];
diff --git a/gui/src/renderer/components/TunnelControl.tsx b/gui/src/renderer/components/TunnelControl.tsx
index db0503cb0a..c9fd568a3f 100644
--- a/gui/src/renderer/components/TunnelControl.tsx
+++ b/gui/src/renderer/components/TunnelControl.tsx
@@ -139,7 +139,7 @@ export default class TunnelControl extends React.Component<ITunnelControlProps>
case 'error':
if (
this.props.tunnelState.state === 'error' &&
- this.props.tunnelState.details.blockFailure
+ this.props.tunnelState.details.blockingError
) {
return (
<Wrapper>
diff --git a/gui/src/renderer/redux/connection/actions.ts b/gui/src/renderer/redux/connection/actions.ts
index 20c63d433d..35af568fb2 100644
--- a/gui/src/renderer/redux/connection/actions.ts
+++ b/gui/src/renderer/redux/connection/actions.ts
@@ -1,6 +1,6 @@
import {
AfterDisconnect,
- IErrorState,
+ ErrorState,
ILocation,
ITunnelStateRelayInfo,
} from '../../../shared/daemon-rpc-types';
@@ -26,7 +26,7 @@ interface IDisconnectingAction {
interface IBlockedAction {
type: 'TUNNEL_ERROR';
- errorState: IErrorState;
+ errorState: ErrorState;
}
interface INewLocationAction {
@@ -75,7 +75,7 @@ function disconnecting(afterDisconnect: AfterDisconnect): IDisconnectingAction {
};
}
-function blocked(errorState: IErrorState): IBlockedAction {
+function blocked(errorState: ErrorState): IBlockedAction {
return {
type: 'TUNNEL_ERROR',
errorState,