From f5b06f3fe46e7e931c04ef2533fab346c3743d46 Mon Sep 17 00:00:00 2001 From: Thiemann96 Date: Wed, 18 Mar 2020 22:56:14 +0100 Subject: [PATCH] updated slide logic --- src/pages/ota-wizard/ota-wizard.html | 12 ++++++------ src/pages/ota-wizard/ota-wizard.ts | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/pages/ota-wizard/ota-wizard.html b/src/pages/ota-wizard/ota-wizard.html index f4e7bb0..8b2508e 100644 --- a/src/pages/ota-wizard/ota-wizard.html +++ b/src/pages/ota-wizard/ota-wizard.html @@ -40,23 +40,23 @@ - + Automatic mode -
+
{{ ' OTAWIZ.OTAMODESELECTION.AUTOMATIC | translate'}}
- + Manual mode -
+
{{ ' OTAWIZ.OTAMODESELECTION.MANUAL | translate'}}
@@ -66,7 +66,7 @@
- + @@ -90,7 +90,7 @@ - + diff --git a/src/pages/ota-wizard/ota-wizard.ts b/src/pages/ota-wizard/ota-wizard.ts index b8e3b9c..a69ec95 100644 --- a/src/pages/ota-wizard/ota-wizard.ts +++ b/src/pages/ota-wizard/ota-wizard.ts @@ -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: