summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/components/Settings.js12
-rw-r--r--app/containers/SettingsPage.js4
-rw-r--r--app/redux/settings/reducers.js2
-rw-r--r--test/components/Settings.spec.js20
-rw-r--r--test/reducers.spec.js1
5 files changed, 1 insertions, 38 deletions
diff --git a/app/components/Settings.js b/app/components/Settings.js
index 7e71c8dbd2..9dddb2267d 100644
--- a/app/components/Settings.js
+++ b/app/components/Settings.js
@@ -3,7 +3,6 @@ import moment from 'moment';
import React, { Component } from 'react';
import { If, Then, Else } from 'react-if';
import { Layout, Container, Header } from './Layout';
-import Switch from './Switch';
import CustomScrollbars from './CustomScrollbars';
import type { AccountReduxState } from '../redux/account/reducers';
@@ -24,7 +23,6 @@ export default class Settings extends Component {
props: SettingsProps;
onClose = () => this.props.onClose();
- onAutoSecure = (autoSecure: boolean) => this.props.onUpdateSettings({ autoSecure });
onExternalLink(type: string) {
this.props.onExternalLink(type);
@@ -76,15 +74,7 @@ export default class Settings extends Component {
</div>
<div className="settings__cell-spacer"></div>
- <div className="settings__cell">
- <div className="settings__cell-label">Auto-connect</div>
- <div className="settings__cell-value">
- <Switch className="settings__autosecure" onChange={ this.onAutoSecure } isOn={ this.props.settings.autoSecure } />
- </div>
- </div>
- <div className="settings__cell-footer">
- When this device connects to the internet, Mullvad VPN will automatically secure your connection
- </div>
+ <div className="settings__cell-footer"></div>
</div>
</Then>
</If>
diff --git a/app/containers/SettingsPage.js b/app/containers/SettingsPage.js
index 6152774c4b..4f5ef06968 100644
--- a/app/containers/SettingsPage.js
+++ b/app/containers/SettingsPage.js
@@ -1,8 +1,6 @@
import { connect } from 'react-redux';
-import { bindActionCreators } from 'redux';
import { push } from 'react-router-redux';
import Settings from '../components/Settings';
-import settingsActions from '../redux/settings/actions';
import { remote, shell } from 'electron';
import { links } from '../config';
@@ -11,13 +9,11 @@ const mapStateToProps = (state) => {
};
const mapDispatchToProps = (dispatch, _props) => {
- const { updateSettings } = bindActionCreators(settingsActions, dispatch);
return {
onQuit: () => remote.app.quit(),
onClose: () => dispatch(push('/connect')),
onViewAccount: () => dispatch(push('/settings/account')),
onExternalLink: (type) => shell.openExternal(links[type]),
- onUpdateSettings: updateSettings
};
};
diff --git a/app/redux/settings/reducers.js b/app/redux/settings/reducers.js
index 5594663dce..da23a5a6ce 100644
--- a/app/redux/settings/reducers.js
+++ b/app/redux/settings/reducers.js
@@ -5,12 +5,10 @@ import { defaultServer } from '../../config';
import type { ReduxAction } from '../store';
export type SettingsReduxState = {
- autoSecure: boolean,
preferredServer: string
};
const initialState: SettingsReduxState = {
- autoSecure: true,
preferredServer: defaultServer
};
diff --git a/test/components/Settings.spec.js b/test/components/Settings.spec.js
index 63087c5088..5655e1e5fa 100644
--- a/test/components/Settings.spec.js
+++ b/test/components/Settings.spec.js
@@ -33,7 +33,6 @@ describe('components/Settings', () => {
};
const settingsState: SettingsReduxState = {
- autoSecure: true,
preferredServer: defaultServer
};
@@ -129,25 +128,6 @@ describe('components/Settings', () => {
Simulate.click(domNode);
});
- it('should call update callback', (done) => {
- const props = makeProps(loggedInAccountState, settingsState, {
- onUpdateSettings: (update) => {
- try {
- expect(update).to.include({ autoSecure: false });
- done();
- } catch(e) {
- done(e);
- }
- }
- });
- const domNode = ReactTestUtils.findRenderedDOMComponentWithClass(render(props), 'settings__autosecure');
-
- // TODO(Andrej): Add click handler to Switch to avoid calling that horrible chain of events.
- Simulate.mouseDown(domNode);
- Simulate.mouseUp(domNode);
- Simulate.change(domNode, { target: { checked: false } });
- });
-
it('should call external links callback', () => {
let collectedExternalLinkTypes: Array<string> = [];
const props = makeProps(loggedOutAccountState, settingsState, {
diff --git a/test/reducers.spec.js b/test/reducers.spec.js
index 3b759c4e9b..92392ad5d3 100644
--- a/test/reducers.spec.js
+++ b/test/reducers.spec.js
@@ -11,7 +11,6 @@ describe('reducers', () => {
const action = {
type: 'UPDATE_SETTINGS',
newSettings: {
- autoSecure: true,
preferredServer: defaultServer
}
};