getLists( e.item.id, function() { sublistMenu.show(); loading.hide(); });
Settings.option( "reporting", true ); Settings.option( "settings", data ); if( "access_token" in data ) Settings.option( "token", data.access_token ); header = { "X-Access-Token": Settings.option( "token" ), "X-Client-ID": clientID, contentType: "application/json; charset=utf-8" }; getUserData(); } ); // WINDOWS var noConfig = new UI.Card( { title: " WunderPebble", body: "\nOpen the Pebble App on your phone and configure the settings for this watchapp.", icon: "images/icon.png", style: "small" }); var error = new UI.Card( { title: " Error", body: "", icon: "images/error.png", style: "small", scrollable: true }); //var splash = new UI.Card( { banner: "images/splash.png" } ); var loading = new UI.Card( { banner: "images/loading.png" } ); var listMenu = new UI.Menu( {sections: [{items:[]}] } ); var sublistMenu = new UI.Menu( {sections: [{items:[]}] } );
function(data) { startCard.hide(); locationSuccess(data); },
function(data) { startCard.hide(); locationError(data); },
/** * Welcome to Pebble.js! * * This is where you write your app. */ var UI = require('ui'); var ajax = require('ajax'); var moment = require('moment'); // Refresh timer var refreshTimer; // Create info card var startCard = new UI.Card({ title: "Getting Location", body: "Please Wait..." }); startCard.show(); function busSuccess(json) { console.log(json); var timeMoment = moment(json.next_bus.time); var timeTil = timeMoment.fromNow(); var timeActual = timeMoment.format('HH:mm'); var infoCard = new UI.Card({ title: "Next Bus is", body: timeTil + '\n(' + timeActual + ')\nFrom:\n' + json.stop.name }); infoCard.show(); // Update location on click
var UI = require("ui"); var ajax = require("ajax"); var voice = require("ui/voice"); var vibe = require("ui/vibe"); var main = new UI.Card({ title: "Thesaurus", scrollable: true, fullscreen: true, font: "Gothic 14", text: "Gothic 14", }); voice.dictate('start', false, function(e) { if (e.err) { console.log('Error: ' + e.err); return; } main.subtitle(e.transcription); var word = e.transcription;