fix add wifi alert

This commit is contained in:
Matt Hill
2020-12-11 11:04:54 -07:00
committed by Aaron Greenspan
parent 14127daa41
commit 039f776ead
3 changed files with 3 additions and 4 deletions

View File

@@ -51,8 +51,7 @@ export class WifiAddPage {
const current = this.serverModel.peek().wifi.current
await this.apiService.addWifi(this.ssid, this.password, this.countryCode, true)
const success = await this.wifiService.confirmWifi(this.ssid)
if (!success) {
this.wifiService.addWifi(this.ssid)
if (success) {
this.navCtrl.back()
this.wifiService.presentAlertSuccess(this.ssid, current)
} else {

View File

@@ -26,7 +26,7 @@
<ion-text color="warning">Warning!</ion-text>
<br />
<br />
<ion-text color="dark">WiFi is a beta feature with known issues. If you make changes to WiFi, your Embassy and its Services may become unreachable for a few hours over Tor. Please use with caution and patience.</ion-text>
<ion-text color="dark">WiFi is a beta feature with known issues. If you make changes to WiFi, your Embassy and its Services may become unreachable for upward of a few hours over Tor. Please use with caution and patience.</ion-text>
</ion-label>
</ion-item>

View File

@@ -78,7 +78,7 @@ export class WifiService {
}
async presentAlertSuccess (current: string, old?: string): Promise<void> {
let message = 'Note. It may take a few minutes for your Embassy to reconnect over Tor. If it does not reconnect after 5 minutes, please unplug the device and plug it back in. You may also need to hard refresh your browser cache.'
let message = 'Note. It may take a while for your Embassy to reconnect over Tor, upward of a few hour. Unplugging the device and plugging it back in may help, but it just takes time. You may also need to hard refresh your browser cache.'
const alert = await this.alertCtrl.create({
header: `Connected to "${current}"`,
message: old ? message : 'You may now unplug your Embassy from Ethernet.<br /></br />' + message,