This commit is contained in:
2015-08-27 22:52:47 +01:00
parent 4f3362d765
commit 5ce403f650
12 changed files with 85 additions and 25 deletions

View File

@@ -24,19 +24,20 @@
// });
Pebble.addEventListener('showConfiguration', function(e) {
Pebble.openURL('http://127.0.0.1/u/bilbo/pebble/iclock/index.html');
Pebble.openURL('http://192.168.1.113/u/bilbo/pebble/iclock/index.html');
// Pebble.openURL('https://pconf.bthlabs.pl/intuiclock/index.html');
});
Pebble.addEventListener('webviewclosed', function(e) {
var config_data = JSON.parse(decodeURIComponent(e.response));
// console.log('Configuration page returned: ' + JSON.stringify(config_data));
console.log('Configuration page returned: ' + JSON.stringify(config_data));
var dict = {};
dict['KEY_SECONDS_HAND'] = config_data['seconds_hand'];
dict['KEY_BATTERY_INDICATOR'] = config_data['battery_indicator'];
dict['KEY_DATE_FORMAT'] = config_data['date_format'];
dict['KEY_WIDE_LAYOUT'] = config_data['wide_layout'];
dict['KEY_XEN_STYLE'] = config_data['xen_style'];
Pebble.sendAppMessage(dict, function() {
// console.log('Send successful!');