mirror of
https://github.com/sensebox/blockly-app
synced 2025-06-09 03:05:51 +02:00
updated slide logic
This commit is contained in:
parent
82409c264a
commit
f5b06f3fe4
2 changed files with 22 additions and 8 deletions
|
@ -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,6 +128,18 @@ 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)
|
||||
|
@ -135,6 +148,7 @@ export class OtaWizardPage implements OnInit, OnDestroy {
|
|||
// 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…
Add table
Reference in a new issue