diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/components/NotificationArea.tsx | 3 | ||||
| -rw-r--r-- | gui/src/renderer/components/WireguardKeys.tsx | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx index e5a4435ded..3876793ff8 100644 --- a/gui/src/renderer/components/NotificationArea.tsx +++ b/gui/src/renderer/components/NotificationArea.tsx @@ -71,7 +71,7 @@ function getErrorCauseMessage(blockReason: ErrorStateCause): string { 'in-app-notifications', 'Could not configure IPv6, please enable it on your system or disable it in the app', ); - case 'set_firewall_policy_error': + case 'set_firewall_policy_error': { let extraMessage = null; switch (process.platform) { case 'linux': @@ -88,6 +88,7 @@ function getErrorCauseMessage(blockReason: ErrorStateCause): string { 'in-app-notifications', 'Failed to apply firewall rules. The device might currently be unsecured', )}${extraMessage ? '. ' + extraMessage : ''}`; + } case 'set_dns_error': return messages.pgettext('in-app-notifications', 'Failed to set system DNS server'); case 'start_tunnel_error': diff --git a/gui/src/renderer/components/WireguardKeys.tsx b/gui/src/renderer/components/WireguardKeys.tsx index 75730c85b7..0c6f64acde 100644 --- a/gui/src/renderer/components/WireguardKeys.tsx +++ b/gui/src/renderer/components/WireguardKeys.tsx @@ -117,10 +117,11 @@ export default class WireguardKeys extends Component<IProps> { private getOnVerifyKeyCb() { return () => { switch (this.props.keyState.type) { - case 'key-set': + case 'key-set': { const key = this.props.keyState.key; this.props.onVerifyKey(key); break; + } default: log.error(`onVerifyKey called from invalid state - ${this.props.keyState.type}`); } @@ -135,11 +136,12 @@ export default class WireguardKeys extends Component<IProps> { let generateKey = this.props.onGenerateKey; switch (this.props.keyState.type) { - case 'key-set': + case 'key-set': { buttonText = regenerateText; const key = this.props.keyState.key; generateKey = () => this.props.onReplaceKey(key); break; + } case 'being-verified': return this.busyButton(regenerateText); case 'being-replaced': @@ -165,7 +167,7 @@ export default class WireguardKeys extends Component<IProps> { private getKeyText() { switch (this.props.keyState.type) { case 'being-verified': - case 'key-set': + case 'key-set': { // mimicking the truncating of the key from website const publicKey = this.props.keyState.key.publicKey; return ( @@ -175,6 +177,7 @@ export default class WireguardKeys extends Component<IProps> { </Text> </View> ); + } case 'being-replaced': case 'being-generated': return <ImageView source="icon-spinner" height={19} width={19} />; @@ -198,7 +201,7 @@ export default class WireguardKeys extends Component<IProps> { switch (this.props.keyState.type) { case 'being-verified': return <ImageView source="icon-spinner" height={20} width={20} />; - case 'key-set': + case 'key-set': { const key = this.props.keyState.key; if (key.valid === true) { return ( @@ -237,7 +240,7 @@ export default class WireguardKeys extends Component<IProps> { } else { return null; } - + } default: return null; } |
