diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2019-07-05 09:46:55 +0100 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2019-07-05 16:49:28 +0100 |
| commit | 4ce55b897d81baab00a16b07a28187ba423fd2e1 (patch) | |
| tree | 54cc27ace293e0936ab4b9a022bcf1b3dca12ea2 /gui/src/renderer/components | |
| parent | 8519fb7719b5d0cad0baa3f812845b238fb4c066 (diff) | |
| download | mullvadvpn-4ce55b897d81baab00a16b07a28187ba423fd2e1.tar.xz mullvadvpn-4ce55b897d81baab00a16b07a28187ba423fd2e1.zip | |
Only show WireguardKeysPage on non-windows
Diffstat (limited to 'gui/src/renderer/components')
| -rw-r--r-- | gui/src/renderer/components/AdvancedSettings.tsx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/gui/src/renderer/components/AdvancedSettings.tsx b/gui/src/renderer/components/AdvancedSettings.tsx index 34136eb2f4..1805e07bae 100644 --- a/gui/src/renderer/components/AdvancedSettings.tsx +++ b/gui/src/renderer/components/AdvancedSettings.tsx @@ -36,6 +36,7 @@ interface IProps { mssfix?: number; port?: number; bridgeState: BridgeState; + enableWireguardKeysPage: boolean; setBridgeState: (value: BridgeState) => void; setEnableIpv6: (value: boolean) => void; setBlockWhenDisconnected: (value: boolean) => void; @@ -256,14 +257,7 @@ export default class AdvancedSettings extends Component<IProps, IState> { }, )} </Cell.Footer> - <View> - <Cell.CellButton onPress={this.props.onViewWireguardKeys}> - <Cell.Label> - {messages.pgettext('advanced-settings-view', 'WireGuard keys')} - </Cell.Label> - <Cell.Icon height={12} width={7} source="icon-chevron" /> - </Cell.CellButton> - </View> + {this.wireguardKeysButton()} </NavigationScrollbars> </View> </NavigationContainer> @@ -273,6 +267,21 @@ export default class AdvancedSettings extends Component<IProps, IState> { ); } + private wireguardKeysButton() { + if (this.props.enableWireguardKeysPage) { + return ( + <View> + <Cell.CellButton onPress={this.props.onViewWireguardKeys}> + <Cell.Label>{messages.pgettext('advanced-settings-view', 'WireGuard keys')}</Cell.Label> + <Cell.Icon height={12} width={7} source="icon-chevron" /> + </Cell.CellButton> + </View> + ); + } else { + return null; + } + } + private onSelectProtocol = (protocol?: RelayProtocol) => { this.props.setRelayProtocolAndPort(protocol); }; |
