diff --git a/client/components/NetworkForm.vue b/client/components/NetworkForm.vue
index 58c6f80e..59a6e464 100644
--- a/client/components/NetworkForm.vue
+++ b/client/components/NetworkForm.vue
@@ -45,6 +45,7 @@
:
Use secure connection (TLS)
@@ -194,6 +196,16 @@ export default {
this.previousUsername = event.target.value;
},
+ onSecureChanged(event) {
+ const ports = ["6667", "6697"];
+ const newPort = event.target.checked ? 0 : 1;
+
+ // If you disable TLS and current port is 6697,
+ // set it to 6667, and vice versa
+ if (this.$refs.serverPort.value === ports[newPort]) {
+ this.$refs.serverPort.value = ports[1 - newPort];
+ }
+ },
onSubmit(event) {
const formData = new FormData(event.target);
const data = {};