mirror of
https://github.com/sensebox/blockly-app
synced 2025-06-08 10:05:50 +02:00
Hotfix for when automatic is selected and Wifi selection slide is hidden
This commit is contained in:
parent
5206c3ab09
commit
96e4d215f6
3 changed files with 8 additions and 5 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue