summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/redux/userinterface
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-12-06 10:42:20 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-01-03 13:48:03 +0100
commita75abb22ed42c8c811aa4967ba82be5077f52ea2 (patch)
treeeab547f9b27566fa34fab981de6e0eb398c8fb46 /gui/src/renderer/redux/userinterface
parent9b6f208a2135344cb7b6e28ac28b76d31b54130c (diff)
downloadmullvadvpn-a75abb22ed42c8c811aa4967ba82be5077f52ea2.tar.xz
mullvadvpn-a75abb22ed42c8c811aa4967ba82be5077f52ea2.zip
Add entry location selection in SelectLocation
Diffstat (limited to 'gui/src/renderer/redux/userinterface')
-rw-r--r--gui/src/renderer/redux/userinterface/actions.ts15
-rw-r--r--gui/src/renderer/redux/userinterface/reducers.ts10
2 files changed, 0 insertions, 25 deletions
diff --git a/gui/src/renderer/redux/userinterface/actions.ts b/gui/src/renderer/redux/userinterface/actions.ts
index 88ffbf216f..e6010d42f2 100644
--- a/gui/src/renderer/redux/userinterface/actions.ts
+++ b/gui/src/renderer/redux/userinterface/actions.ts
@@ -1,5 +1,4 @@
import { MacOsScrollbarVisibility } from '../../../shared/ipc-schema';
-import { LocationScope } from './reducers';
export interface IUpdateLocaleAction {
type: 'UPDATE_LOCALE';
@@ -15,11 +14,6 @@ export interface IUpdateConnectionInfoOpenAction {
type: 'TOGGLE_CONNECTION_PANEL';
}
-export interface ISetLocationScopeAction {
- type: 'SET_LOCATION_SCOPE';
- scope: LocationScope;
-}
-
export interface ISetWindowFocusedAction {
type: 'SET_WINDOW_FOCUSED';
focused: boolean;
@@ -50,7 +44,6 @@ export type UserInterfaceAction =
| IUpdateLocaleAction
| IUpdateWindowArrowPositionAction
| IUpdateConnectionInfoOpenAction
- | ISetLocationScopeAction
| ISetWindowFocusedAction
| IAddScrollPosition
| IRemoveScrollPosition
@@ -77,13 +70,6 @@ function toggleConnectionPanel(): IUpdateConnectionInfoOpenAction {
};
}
-function setLocationScope(scope: LocationScope): ISetLocationScopeAction {
- return {
- type: 'SET_LOCATION_SCOPE',
- scope,
- };
-}
-
function setWindowFocused(focused: boolean): ISetWindowFocusedAction {
return {
type: 'SET_WINDOW_FOCUSED',
@@ -126,7 +112,6 @@ export default {
updateLocale,
updateWindowArrowPosition,
toggleConnectionPanel,
- setLocationScope,
setWindowFocused,
addScrollPosition,
removeScrollPosition,
diff --git a/gui/src/renderer/redux/userinterface/reducers.ts b/gui/src/renderer/redux/userinterface/reducers.ts
index 5adac07937..9247dc8a5f 100644
--- a/gui/src/renderer/redux/userinterface/reducers.ts
+++ b/gui/src/renderer/redux/userinterface/reducers.ts
@@ -1,16 +1,10 @@
import { MacOsScrollbarVisibility } from '../../../shared/ipc-schema';
import { ReduxAction } from '../store';
-export enum LocationScope {
- bridge = 0,
- relay,
-}
-
export interface IUserInterfaceReduxState {
locale: string;
arrowPosition?: number;
connectionPanelVisible: boolean;
- locationScope: LocationScope;
windowFocused: boolean;
scrollPosition: Record<string, [number, number]>;
macOsScrollbarVisibility?: MacOsScrollbarVisibility;
@@ -20,7 +14,6 @@ export interface IUserInterfaceReduxState {
const initialState: IUserInterfaceReduxState = {
locale: 'en',
connectionPanelVisible: false,
- locationScope: LocationScope.relay,
windowFocused: false,
scrollPosition: {},
macOsScrollbarVisibility: undefined,
@@ -41,9 +34,6 @@ export default function (
case 'TOGGLE_CONNECTION_PANEL':
return { ...state, connectionPanelVisible: !state.connectionPanelVisible };
- case 'SET_LOCATION_SCOPE':
- return { ...state, locationScope: action.scope };
-
case 'SET_WINDOW_FOCUSED':
return { ...state, windowFocused: action.focused };