diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b57c91bb..c243093c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,3 +26,6 @@ Changed for individual apps are listed in `apps/appname/ChangeLog` * Added ability to specify dependencies (used for `notify` at the moment) * Fixed Promise-based bug in removeApp * Fixed bin/firmwaremaker and bin/apploader CLI to handle binary file uploads correctly +* Added progress bar on Bangle.js for uploads +* Provide a proper error message in case JSON decode fails +* Check you're connecting with a Bangle.js of the correct version diff --git a/core b/core index 62615f6ea..06204c852 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 62615f6ea4855381e0b4b4b74f8ca69aa594181e +Subproject commit 06204c852d5cd8101fc8e23ef8d43903c25a4edc diff --git a/loader.js b/loader.js index 248d1c2a9..77174a24c 100644 --- a/loader.js +++ b/loader.js @@ -11,10 +11,20 @@ if (window.location.host=="banglejs.com") { 'This is not the official Bangle.js App Loader - you can try the Official Version here.'; } -var APP_SOURCECODE_URL; +var RECOMMENDED_VERSION = "2v08"; +// could check http://www.espruino.com/json/BANGLEJS.json for this + (function() { let username = "espruino"; let githubMatch = window.location.href.match(/\/(\w+)\.github\.io/); if (githubMatch) username = githubMatch[1]; - APP_SOURCECODE_URL = `https://github.com/${username}/BangleApps/tree/master/apps`; + Const.APP_SOURCECODE_URL = `https://github.com/${username}/BangleApps/tree/master/apps`; })(); + +function onFoundDeviceInfo(deviceId, deviceVersion) { + if (deviceId != "BANGLEJS") { + showToast(`You're using ${deviceId}, not a Bangle.js. Did you want espruino.com/apps instead?` ,"warning", 20000); + } else if (versionLess(deviceVersion, RECOMMENDED_VERSION)) { + showToast(`You're using an old Bangle.js firmware (${deviceVersion}). You can update with the instructions here` ,"warning", 20000); + } +}