diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2017-11-21 12:34:20 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2017-11-23 12:41:13 +0100 |
| commit | 0d5771aa9b7a8f50cb514b2e7527ff748cdde7f0 (patch) | |
| tree | ded53c8123e63824acf8367cecb90f63f15752ff /app/components | |
| parent | a1a7a920e787689eed8525f4c2ffd521c9d538ff (diff) | |
| download | mullvadvpn-0d5771aa9b7a8f50cb514b2e7527ff748cdde7f0.tar.xz mullvadvpn-0d5771aa9b7a8f50cb514b2e7527ff748cdde7f0.zip | |
Temporary hardcode automatic constraints selection since we cannot use
any constraint with custom tunnel endpoint
Diffstat (limited to 'app/components')
| -rw-r--r-- | app/components/AdvancedSettings.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/components/AdvancedSettings.js b/app/components/AdvancedSettings.js index 227499a1a8..1821309369 100644 --- a/app/components/AdvancedSettings.js +++ b/app/components/AdvancedSettings.js @@ -7,14 +7,16 @@ import CustomScrollbars from './CustomScrollbars'; export class AdvancedSettings extends React.Component { props: { - onClose: () => void, + host: string, protocol: string, port: string|number, - updateConstraints: (string, string|number) => void, + onUpdateConstraints: (host: string, protocol: string, port: string|number) => void, + onClose: () => void, }; render() { let portSelector = null; + const host = this.props.host; let protocol = this.props.protocol.toUpperCase(); if (protocol === 'AUTOMATIC') { @@ -30,7 +32,7 @@ export class AdvancedSettings extends React.Component { values={ ['Automatic', 'UDP', 'TCP'] } value={ protocol } onSelect={ protocol => { - this.props.updateConstraints(protocol, 'Automatic'); + this.props.onUpdateConstraints(host, protocol, 'Automatic'); }}/> <div className="settings__cell-spacer"></div> @@ -41,6 +43,7 @@ export class AdvancedSettings extends React.Component { } _createPortSelector() { + const host = this.props.host; const protocol = this.props.protocol.toUpperCase(); const ports = protocol === 'TCP' ? ['Automatic', 80, 443] @@ -51,7 +54,7 @@ export class AdvancedSettings extends React.Component { values={ ports } value={ this.props.port } onSelect={ port => { - this.props.updateConstraints(protocol, port); + this.props.onUpdateConstraints(host, protocol, port); }} />; } } |
