updated slide logic

development
Thiemann96 5 years ago
parent 82409c264a
commit f5b06f3fe4

@ -40,23 +40,23 @@
<ion-grid>
<ion-row align-items-center>
<ion-col col-12 col-md-6>
<ion-card>
<ion-card (click)="showAutomatic()">
<ion-card-header>
Automatic mode
</ion-card-header>
<ion-card-content>
<ion-icon class="mode_selection" name="wifi"></ion-icon> <br>
<ion-icon class="mode_selection" name="wifi" ></ion-icon> <br>
{{ ' OTAWIZ.OTAMODESELECTION.AUTOMATIC | translate'}}
</ion-card-content>
</ion-card>
</ion-col>
<ion-col col-12 col-md-6>
<ion-card>
<ion-card (click)="showManual()">
<ion-card-header>
Manual mode
</ion-card-header>
<ion-card-content>
<ion-icon class="mode_selection" name="hammer"></ion-icon> <br>
<ion-icon class="mode_selection" name="hammer" ></ion-icon> <br>
{{ ' OTAWIZ.OTAMODESELECTION.MANUAL | translate'}}
</ion-card-content>
</ion-card>
@ -66,7 +66,7 @@
</ion-grid>
</ion-slide>
<!-- OTA Manual -->
<ion-slide>
<ion-slide *ngIf="manual" id="manual-slide">
<ion-grid>
<ion-row align-items-center>
<ion-col col-12 col-md-6>
@ -90,7 +90,7 @@
</ion-grid>
</ion-slide>
<!-- OTA Automatic -->
<ion-slide>
<ion-slide *ngIf="automatic" id="automatic-slide">
<ion-grid>
<ion-row align-items-center>
<ion-col col-12 col-md-6>

@ -48,7 +48,8 @@ export class OtaWizardPage implements OnInit, OnDestroy {
private log: LoggingProvider
private slideHistory: string[] = [OtaSlides[OtaSlides.Intro]] // for debug info in logs
private counts = { compile: 0, connect: 0, upload: 0 }
private manual = false;
private automatic = false;
constructor(
private network: Network,
private otaWifi: OtaWifiProvider,
@ -127,14 +128,27 @@ export class OtaWizardPage implements OnInit, OnDestroy {
this.modus = "manual"
}
}
showAutomatic(){
this.automatic = true;
this.manual = false;
this.slides.slideNext()
}
showManual(){
this.manual = true;
this.automatic = false;
this.slides.slideNext()
}
activateOta(){
// Sends request; upon successful response go to next slide (wifi selection)
}
// call logic for each slide
onSlideChange () {
this.slideHistory.push(OtaSlides[this.currentSlide])
console.log(this.currentSlide)
switch (this.currentSlide) {
case OtaSlides.Intro:
case OtaSlides.Intro2:

Loading…
Cancel
Save