mirror of
https://github.com/sensebox/blockly-app
synced 2025-06-07 17:05:51 +02:00
test integration of OtaWifiProvider into Blockly page
This commit is contained in:
parent
85288a451e
commit
af69092769
2 changed files with 13 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
import { ApiProvider } from '../../providers/api/api';
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { OtaWifiProvider } from '../../providers/ota-wifi/ota-wifi';
|
||||
|
||||
/**
|
||||
* Generated class for the SenseBoxPage page.
|
||||
|
@ -16,13 +16,19 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
|||
})
|
||||
export class BlocklyPage {
|
||||
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, private api: ApiProvider) {
|
||||
constructor(
|
||||
public navCtrl: NavController,
|
||||
public navParams: NavParams,
|
||||
private otaWifi: OtaWifiProvider) {
|
||||
// otaWifi is here only for testing, should later be encapsulated by OtaWizardComponent
|
||||
console.log('wifi strategy:', otaWifi.strategy)
|
||||
otaWifi.findSenseboxes()
|
||||
.then(console.log)
|
||||
.catch(console.error)
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad SenseBoxPage');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ export class OtaWifiProvider {
|
|||
// TODO: replace with "WifiCapabilities".
|
||||
// makes it easier to check in each functions if required functionality is available
|
||||
enum WifiStrategy {
|
||||
Automatic, // android, iOS 11+
|
||||
Manual, // older iOS
|
||||
Unavailable, // browser
|
||||
Automatic = 'Automatic', // android, iOS 11+
|
||||
Manual = 'Manual', // older iOS
|
||||
Unavailable = 'Unavailable', // browser
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue