1
0
Fork 0
mirror of https://github.com/sensebox/blockly-app synced 2026-01-03 02:01:34 +01:00

preparations for demo

This commit is contained in:
Norwin 2018-11-19 20:23:17 +01:00
parent ab19194acd
commit f4d854c7d7
6 changed files with 22 additions and 32 deletions

View file

@ -14,7 +14,7 @@ export class openSenseApp {
@ViewChild(Nav) nav: Nav;
rootPage:any = OtaWizardPage; // TODO: for development, revert to HomePage
rootPage:any = BlocklyPage; // TODO: for development, revert to HomePage
pages: Array<{title: string, component: any}> = [
{ title: 'Home', component: HomePage },

View file

@ -10,7 +10,8 @@ import { ApiProvider } from '../providers/api/api';
import { HttpClientModule } from '@angular/common/http';
import { OtaWizardPage } from '../pages/ota-wizard/ota-wizard';
import { OtaWizardPageModule } from '../pages/ota-wizard/ota-wizard.module';
import { CompilerProvider } from '../providers/compiler/compiler';
import { BlocklyPage } from '../pages/Blockly/blockly';
import { BlocklyPageModule } from '../pages/Blockly/blockly.module';
@NgModule({
declarations: [
@ -21,12 +22,14 @@ import { CompilerProvider } from '../providers/compiler/compiler';
HttpClientModule,
BrowserModule,
OtaWizardPageModule,
BlocklyPageModule,
IonicModule.forRoot(openSenseApp)
],
bootstrap: [IonicApp],
entryComponents: [
openSenseApp,
OtaWizardPage,
BlocklyPage,
HomePage
],
providers: [
@ -34,7 +37,6 @@ import { CompilerProvider } from '../providers/compiler/compiler';
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
ApiProvider,
CompilerProvider,
]
})
export class AppModule {}

View file

@ -16,21 +16,17 @@
<ion-content padding>
<!-- Real floating action button, fixed. It will not scroll with the content -->
<ion-fab top right edge>
<button ion-fab mini (click)="launchOtaWizard() " color ="light"><ion-icon name="wifi"></ion-icon></button>
</ion-fab>
<div>
Blockly should be displayed here !
</div>
<ion-item>
<ion-textarea placeholder="Enter your text here" #sketchtext>
<ion-input>id = "sketchtext" </ion-input>
</ion-textarea>
</ion-item>
<textarea placeholder="Enter your Sketch here" [(ngModel)]="sketchtext"></textarea>
</ion-content>

View file

@ -1,10 +1,8 @@
page-blockly {
$text-input-highlight-color-valid : #32db64
Color of the input highlight when valid
$text-input-highlight-color-invalid #f53d3d
Color of the input highlight when invalid
$text-input-placeholder-color #999
Color of the input placeholder
textarea {
width: 100%;
height: 90%;
resize: none;
margin-top: 20px;
}
}

View file

@ -15,20 +15,14 @@ import { OtaWizardPage } from '../ota-wizard/ota-wizard';
templateUrl: 'blockly.html',
})
export class BlocklyPage {
sketchtext = ""
sketchtext = 'void setup() {\n Serial.begin(9600);\n Serial.println(\"Hello World\");\n}\n\nvoid loop() {\n\n}'
constructor(
public navCtrl: NavController,
public navParams: NavParams) {
}
goTo(sketch) {
this.sketchtext = '' || 'No text Entered';}
ionViewDidLoad() {
console.log('ionViewDidLoad SenseBoxPage');
}
public navParams: NavParams) { }
launchOtaWizard() {
this.navCtrl.setRoot(OtaWizardPage,{sketch : this.sketchtext})
this.navCtrl.push(OtaWizardPage,{ sketch : this.sketchtext })
}
}

View file

@ -174,7 +174,7 @@ export class OtaWizardPage implements OnInit, OnDestroy {
this.compiledSketch = 'firmware binary here..'
this.state.compilation = 'done'
this.slides.lockSwipeToNext(false)
}, 1000)
}, 5000)
}
}