diff options
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); }; |
