Skip to content

Commit

Permalink
* Added progress bar on Bangle.js for uploads
Browse files Browse the repository at this point in the history
* Provide a proper error message in case JSON decode fails
* Check you're connecting with a Bangle.js of the correct version
  • Loading branch information
gfwilliams committed Oct 21, 2020
1 parent 0ec2bad commit 785b48f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion core
Submodule core updated 4 files
+74 −40 js/comms.js
+16 −11 js/index.js
+2 −2 js/ui.js
+13 −1 js/utils.js
14 changes: 12 additions & 2 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@ if (window.location.host=="banglejs.com") {
'This is not the official Bangle.js App Loader - you can try the <a href="https://banglejs.com/apps/">Official Version</a> here.';
}

var APP_SOURCECODE_URL;
var RECOMMENDED_VERSION = "2v08";
// could check http:https://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 <a href="https://espruino.com/apps">espruino.com/apps</a> instead?` ,"warning", 20000);
} else if (versionLess(deviceVersion, RECOMMENDED_VERSION)) {
showToast(`You're using an old Bangle.js firmware (${deviceVersion}). You can <a href="https://www.espruino.com/Bangle.js#firmware-updates" target="_blank">update with the instructions here</a>` ,"warning", 20000);
}
}

0 comments on commit 785b48f

Please sign in to comment.