mirror of
https://github.com/sensebox/blockly-app
synced 2025-06-08 18:35:50 +02:00
add SettingsPage & link to Blockly Book to menu
This commit is contained in:
parent
2817f1daf8
commit
0a02ee67e2
4 changed files with 56 additions and 7 deletions
|
@ -16,9 +16,29 @@ export class openSenseApp {
|
|||
|
||||
rootPage:any = BlocklyPage;
|
||||
|
||||
pages: Array<{title: string, component: any}> = [
|
||||
{ title: 'MENU.BLOCKLY', component: 'BlocklyPage' },
|
||||
{ title: 'MENU.ABOUT', component: 'AboutPage' },
|
||||
pages: Array<AppPage> = [
|
||||
{
|
||||
title: 'MENU.BLOCKLY',
|
||||
icon: 'code',
|
||||
component: 'BlocklyPage'
|
||||
},
|
||||
{
|
||||
title: 'MENU.DOCS',
|
||||
icon: 'book',
|
||||
callback: () => {
|
||||
window.open('https://sensebox.github.io/books-v2/blockly/' + this.translate.currentLang)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'MENU.ABOUT',
|
||||
icon: 'at',
|
||||
component: 'AboutPage'
|
||||
},
|
||||
{
|
||||
title: 'MENU.SETTINGS',
|
||||
icon: 'settings',
|
||||
component: 'SettingsPage'
|
||||
},
|
||||
];
|
||||
|
||||
constructor(
|
||||
|
@ -40,9 +60,19 @@ export class openSenseApp {
|
|||
})
|
||||
}
|
||||
|
||||
openPage(page) {
|
||||
openPage(page: AppPage) {
|
||||
if (page.callback)
|
||||
return page.callback()
|
||||
|
||||
// Reset the content nav to have just this page
|
||||
// we wouldn't want the back button to show in this scenario
|
||||
this.nav.setRoot(page.component);
|
||||
}
|
||||
}
|
||||
|
||||
interface AppPage {
|
||||
title: string,
|
||||
icon: string,
|
||||
component?: string,
|
||||
callback?: () => any,
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<ion-content>
|
||||
<ion-list>
|
||||
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
|
||||
<ion-icon [name]="p.icon"></ion-icon>
|
||||
{{ p.title | translate }}
|
||||
</button>
|
||||
</ion-list>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
"MENU": {
|
||||
"TITLE": "Menü",
|
||||
"ABOUT": "Über",
|
||||
"BLOCKLY": "Blockly"
|
||||
"BLOCKLY": "Blockly",
|
||||
"DOCS": "Dokumentation",
|
||||
"SETTINGS": "Einstellungen"
|
||||
},
|
||||
"ABOUT": {
|
||||
"TITLE": "Über",
|
||||
|
@ -22,6 +24,13 @@
|
|||
"BTN_CODE": "Quellcode Ansicht",
|
||||
"BTN_OTA": "OTA Programmierung"
|
||||
},
|
||||
"SETTINGS": {
|
||||
"TITLE": "Einstellungen",
|
||||
"LOG_OPTIN": {
|
||||
"TITLE": "Sende uns automatisch Fehler-Berichte zu",
|
||||
"TEXT": "Das hilft uns beim Beheben von Fehlern.<br/>Keine persönlichen Daten außer deinem Sketch werden übertragen."
|
||||
}
|
||||
},
|
||||
"OTAWIZ": {
|
||||
"TITLE": "Over The Air Programmierung",
|
||||
"BTN_NEXT": "Weiter",
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
"MENU": {
|
||||
"TITLE": "Menu",
|
||||
"ABOUT": "About",
|
||||
"BLOCKLY": "Blockly"
|
||||
"BLOCKLY": "Blockly",
|
||||
"DOCS": "Documentation",
|
||||
"SETTINGS": "Settings"
|
||||
},
|
||||
"ABOUT": {
|
||||
"TITLE": "About",
|
||||
|
@ -22,6 +24,13 @@
|
|||
"BTN_CODE": "Code View",
|
||||
"BTN_OTA": "OTA Programmer"
|
||||
},
|
||||
"SETTINGS": {
|
||||
"TITLE": "Settings",
|
||||
"LOG_OPTIN": {
|
||||
"TITLE": "Automatically send error reports to us",
|
||||
"TEXT": "These reports help us in troubleshooting issues.<br/>No personal information is collected, except for your Sketch."
|
||||
}
|
||||
},
|
||||
"OTAWIZ": {
|
||||
"TITLE": "Over The Air Programmer",
|
||||
"BTN_NEXT": "Continue",
|
||||
|
@ -66,7 +75,7 @@
|
|||
"AUTO": {
|
||||
"TITLE": "Select your senseBox",
|
||||
"TEXT1": "All powered senseBoxes around you with OTA mode enabled are listed here.",
|
||||
"TEXT2": "Please check the last digits of MAC-Adress on your WiFi Bee to identify your senseBox. You can find it printed on the bottom of the WiFi Bee.",
|
||||
"TEXT2": "Please check the last digits of the MAC-Adress on your WiFi Bee to identify your senseBox. You can find it printed on the bottom of the WiFi Bee.",
|
||||
"TEXT3": "If you can't find your senseBox, please make sure that your WiFi Bee is mounted correctly, OTA mode is enabled and GPS is enabled on this device.",
|
||||
"AVAILABLE": "Available senseBox WiFis",
|
||||
"SCANNING": "searching...",
|
||||
|
|
Loading…
Add table
Reference in a new issue