Skip to content

Commit

Permalink
Add port testing
Browse files Browse the repository at this point in the history
  • Loading branch information
6c65726f79 committed Feb 18, 2023
1 parent a70d3fb commit 05e41ab
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/views/ServerConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@
<ion-toggle v-model="config['port-forwarding-enabled']"></ion-toggle>
</span>
</ion-item>

<div class="ion-padding small">
<ion-button size="default" @click="testPort()">{{ Locale.testPort }}</ion-button>
</div>
</ion-list>

<ion-list>
Expand Down Expand Up @@ -563,6 +567,18 @@ export default defineComponent({
})
loading.dismiss();
},
async testPort() {
const loading = await loadingController.create({});
await loading.present();
await TransmissionRPC.rpcCall("port-test")
.then((response) => {
Utils.responseToast(response.arguments['port-is-open'] ? Locale.success : Locale.error.error);
})
.catch((error) => {
Utils.responseToast(error.message);
})
loading.dismiss();
},
async saveSettings() {
const loading = await loadingController.create({});
await loading.present();
Expand Down

0 comments on commit 05e41ab

Please sign in to comment.