translations and slide logic

development
Thiemann96 5 years ago
parent bc0d61e345
commit 5801e7a4d5

@ -63,6 +63,7 @@
"TITLE": "Over The Air Programmierung", "TITLE": "Over The Air Programmierung",
"BTN_NEXT": "Weiter", "BTN_NEXT": "Weiter",
"BTN_CLOSE": "Schließen", "BTN_CLOSE": "Schließen",
"BTN_REQUEST":"OTA Modus aktivieren!",
"BTN_BACK": "Zurück", "BTN_BACK": "Zurück",
"INTRO": { "INTRO": {
"TITLE": "Willkommen", "TITLE": "Willkommen",
@ -78,7 +79,16 @@
"STEPS": "Um den OTA Modus zu aktivieren...", "STEPS": "Um den OTA Modus zu aktivieren...",
"STEP1": "halte den den 'Switch' Knopf (grau oder blau) gedrückt", "STEP1": "halte den den 'Switch' Knopf (grau oder blau) gedrückt",
"STEP2": "drücke den roten 'Reset' Knopf einmal", "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": { "COMPILATION": {
"COMPILING": { "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!" "HINT": "<em>Hint:</em> A <a href=\"https://blockly.sensebox.de\">web version of Blockly for senseBox</a> is available as well!"
}, },
"LOGIN":{ "LOGIN":{
"LOADING":"Logging in...", "LOADING":"Logging in..."
}, },
"BLOCKLY": { "BLOCKLY": {
"TITLE": "Blockly for senseBox", "TITLE": "Blockly for senseBox",
@ -58,6 +58,7 @@
"BTN_NEXT": "Continue", "BTN_NEXT": "Continue",
"BTN_CLOSE": "Close", "BTN_CLOSE": "Close",
"BTN_BACK": "Back", "BTN_BACK": "Back",
"BTN_REQUEST":"Enable OTA Mode",
"INTRO": { "INTRO": {
"TITLE": "Welcome", "TITLE": "Welcome",
"TEXT": "To transfer your code to your senseBox over the air (OTA), please follow these steps.", "TEXT": "To transfer your code to your senseBox over the air (OTA), please follow these steps.",
@ -72,7 +73,16 @@
"STEPS": "To enable OTA mode...", "STEPS": "To enable OTA mode...",
"STEP1": "press &amp; hold the switch button (gray or blue)", "STEP1": "press &amp; hold the switch button (gray or blue)",
"STEP2": "press the red r eset button shortly", "STEP2": "press the red r eset button shortly",
"STEP3": "release the switch button after one second" "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": { "COMPILATION": {
"COMPILING": { "COMPILING": {

@ -9,7 +9,7 @@
<ion-content padding> <ion-content padding>
<ion-grid> <ion-grid>
<ion-row> <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>
<ion-row class="errorMessage"> <ion-row class="errorMessage">
<p > {{errorMessages[error.message]}} </p> <p > {{errorMessages[error.message]}} </p>

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

@ -182,12 +182,20 @@ export class OtaWizardPage implements OnInit, OnDestroy {
// call logic for each slide // call logic for each slide
onSlideChange() { onSlideChange() {
this.slideHistory.push(OtaSlides[this.currentSlide]) this.slideHistory.push(OtaSlides[this.currentSlide])
console.log(this.currentSlide)
switch (this.currentSlide) { switch (this.currentSlide) {
case OtaSlides.Intro: case OtaSlides.Intro:
this.slides.lockSwipeToNext(false);
case OtaSlides.Intro2: case OtaSlides.Intro2:
this.slides.lockSwipeToNext(true)
break break
case OtaSlides.Intro3:
if(this.automatic){
this.slides.lockSwipeToNext(true);
}
if(this.manual){
this.slides.lockSwipeToNext(false);
}
break
case OtaSlides.Compilation: case OtaSlides.Compilation:
this.handleCompilation() this.handleCompilation()
break break
@ -326,6 +334,7 @@ enum OtaSlides {
Intro = 0, Intro = 0,
Intro2 = 1, Intro2 = 1,
Compilation = 2, Compilation = 2,
WifiSelection = 3, Intro3 = 3,
Upload = 4, WifiSelection = 4,
Upload = 5,
} }

Loading…
Cancel
Save