translations and slide logic

development
Thiemann96 5 years ago
parent bc0d61e345
commit 5801e7a4d5

@ -63,6 +63,7 @@
"TITLE": "Over The Air Programmierung",
"BTN_NEXT": "Weiter",
"BTN_CLOSE": "Schließen",
"BTN_REQUEST":"OTA Modus aktivieren!",
"BTN_BACK": "Zurück",
"INTRO": {
"TITLE": "Willkommen",
@ -78,7 +79,16 @@
"STEPS": "Um den OTA Modus zu aktivieren...",
"STEP1": "halte den den 'Switch' Knopf (grau oder blau) gedrückt",
"STEP2": "drücke den roten 'Reset' Knopf einmal",
"STEP3": "lasse den 'Switch' Knopf nach einer Sekunde los."
"STEP3": "lasse den 'Switch' Knopf nach einer Sekunde los.",
"AUTOMATIC":{
"STEP1":"Laden den Over-the-Air Sketch der openSenseMap auf die senseBox",
"STEP2":"Verbinde dich mit gleichen Netzwekr in dem die senseBox eingewählt ist",
"STEP3":"Klicke auf OTA Modus aktivieren!"
}
},
"OTAMODESELECTION":{
"AUTOMATIC":"Wähle diesen Modus wenn du den openSenseMap Sketch nach dem 20.03.2020 auf die senseBox hochgeladen hast!",
"MANUAL":"Wähle diesen Modus aus um die senseBox manuell in den OTA Modus zu schalten!"
},
"COMPILATION": {
"COMPILING": {

@ -22,7 +22,7 @@
"HINT": "<em>Hint:</em> A <a href=\"https://blockly.sensebox.de\">web version of Blockly for senseBox</a> is available as well!"
},
"LOGIN":{
"LOADING":"Logging in...",
"LOADING":"Logging in..."
},
"BLOCKLY": {
"TITLE": "Blockly for senseBox",
@ -58,6 +58,7 @@
"BTN_NEXT": "Continue",
"BTN_CLOSE": "Close",
"BTN_BACK": "Back",
"BTN_REQUEST":"Enable OTA Mode",
"INTRO": {
"TITLE": "Welcome",
"TEXT": "To transfer your code to your senseBox over the air (OTA), please follow these steps.",
@ -71,8 +72,17 @@
"TEXT": "To transfer your code, the senseBox must be in OTA mode.<br/>This is indicated by the green blinking LED next to the red reset button.",
"STEPS": "To enable OTA mode...",
"STEP1": "press &amp; hold the switch button (gray or blue)",
"STEP2": "press the red reset button shortly",
"STEP3": "release the switch button after one second"
"STEP2": "press the red r eset button shortly",
"STEP3": "release the switch button after one second",
"AUTOMATIC":{
"STEP1":"Upload the Over-the-Air Sketch from the OpenSenseMap to the senseBox",
"STEP2":"Connect this device to the same network the senseBox is connected with",
"STEP3":"Click Enable OTA Mode!"
}
},
"OTAMODESELECTION":{
"AUTOMATIC":"Choose this mode if your senseBox is currently running an OpenSenseMap Sketch acquired after 20.03.2020",
"MANUAL":"Choose this mode if you have uploaded the OTA Sketch"
},
"COMPILATION": {
"COMPILING": {

@ -9,7 +9,7 @@
<ion-content padding>
<ion-grid>
<ion-row>
There was an error when trying to login. The error code is:<code>{{error.message}}</code>.
There was an error when trying to login. The error code is:<code>{{error.message}}</code>
</ion-row>
<ion-row class="errorMessage">
<p > {{errorMessages[error.message]}} </p>

@ -51,7 +51,7 @@
</ion-card-header>
<ion-card-content>
<ion-icon class="mode_selection" name="wifi" ></ion-icon> <br>
{{ ' OTAWIZ.OTAMODESELECTION.AUTOMATIC | translate'}}
{{ 'OTAWIZ.OTAMODESELECTION.AUTOMATIC' | translate}}
</ion-card-content>
</ion-card>
</ion-col>
@ -62,7 +62,7 @@
</ion-card-header>
<ion-card-content>
<ion-icon class="mode_selection" name="hammer" ></ion-icon> <br>
{{ ' OTAWIZ.OTAMODESELECTION.MANUAL | translate'}}
{{ 'OTAWIZ.OTAMODESELECTION.MANUAL' | translate}}
</ion-card-content>
</ion-card>
</ion-col>
@ -71,8 +71,8 @@
</ion-grid>
</ion-slide>
<!-- OTA Manual -->
<ion-slide *ngIf="manual" id="manual-slide">
<ion-grid>
<ion-slide id="manual-slide">
<ion-grid *ngIf="manual">
<ion-row align-items-center>
<ion-col col-12 col-md-6>
<img class="tutorial_gif" src="../../assets/imgs/ota_modus.gif" />
@ -92,10 +92,7 @@
</ion-col>
</ion-row>
</ion-grid>
</ion-slide>
<!-- OTA Automatic -->
<ion-slide *ngIf="automatic" id="automatic-slide">
<ion-grid>
<ion-grid *ngIf="automatic">
<ion-row align-items-center>
<ion-col col-12 col-md-6>
<ol style="text-align: left">
@ -105,7 +102,6 @@
</ol>
</ion-col>
<ion-col col-12 col-md-6>
<!-- @TODO: diagram! -->
<button *ngIf="requestSuccessful;else request" ion-button large clear icon-end color="primary" (click)="slides.slideNext()">
{{ 'OTAWIZ.BTN_NEXT' | translate }}

@ -182,12 +182,20 @@ 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:
this.slides.lockSwipeToNext(false);
case OtaSlides.Intro2:
this.slides.lockSwipeToNext(true)
break
case OtaSlides.Intro3:
if(this.automatic){
this.slides.lockSwipeToNext(true);
}
if(this.manual){
this.slides.lockSwipeToNext(false);
}
break
case OtaSlides.Compilation:
this.handleCompilation()
break
@ -326,6 +334,7 @@ enum OtaSlides {
Intro = 0,
Intro2 = 1,
Compilation = 2,
WifiSelection = 3,
Upload = 4,
Intro3 = 3,
WifiSelection = 4,
Upload = 5,
}

Loading…
Cancel
Save