1
0
Fork 0
mirror of https://github.com/sensebox/blockly-app synced 2025-06-08 01:35:52 +02:00

Hotfix for when automatic is selected and Wifi selection slide is hidden

This commit is contained in:
Thiemann96 2020-03-28 15:35:31 +01:00
parent 5206c3ab09
commit 96e4d215f6
3 changed files with 8 additions and 5 deletions

View file

@ -136,7 +136,7 @@
</ng-container>
</ion-slide>
<!-- wifi selection -->
<ion-slide id="wifi-slide" *ngIf="!wifiSlideHidden">
<ion-slide id="wifi-slide" *ngIf="!slideIsHidden(slideWifi)">
<ion-grid>
<div id="wifi-manual" *ngIf="state.wifiSelection == 'manual'">
<ion-row align-items-center>

View file

@ -135,14 +135,13 @@ export class OtaWizardPage implements OnInit, OnDestroy {
}
}
showAutomatic() {
this.wifiSlideHidden = true;
this.hideSlide(OtaSlides.WifiSelection);
this.automatic = true;
this.manual = false;
this.slides.slideNext()
}
showManual() {
this.wifiSlideHidden = false;
this.manual = true;
this.automatic = false;
this.slides.slideNext()
@ -186,8 +185,12 @@ export class OtaWizardPage implements OnInit, OnDestroy {
}
get currentSlide(): OtaSlides {
const current = this.slides.getActiveIndex()
let current = this.slides.getActiveIndex()
const hiddenOffset = this.hiddenSlides.filter(slide => slide <= current).length
if(current === 3 && this.slideIsHidden(this.slideWifi)){
// Hotfix for when automatic is selected and Wifi selection slide is hidden
current +=1;
}
return current + hiddenOffset
}

View file

@ -9,7 +9,7 @@ declare var WifiWizard2: any
// corresponding to the initial MCU firmware
const SSID_PREFIX = 'sensebox'
const SENSEBOX_API = 'http://192.168.1.1'
const URL_sensebox = 'http://10.0.1.12'
const URL_sensebox = 'http://192.168.0.46'
/*
Interface for uploading a binary to a senseBox MCU.
*/