Merge branch 'espruino:master' into master
commit
0eca1182c2
40
apps.json
40
apps.json
|
|
@ -1,25 +1,35 @@
|
|||
---
|
||||
# =================================================================
|
||||
# ALL THE INFORMATION INSIDE APPS.JSON HAS NOW BEEN MOVED
|
||||
#
|
||||
# You'll find it inside a file called apps/yourapp/metadata.json
|
||||
#
|
||||
# Otherwise nothing has changed. GitHub Pages will automatically
|
||||
# create apps.json as your site is hosted, or if you're hosting
|
||||
# yourself you can run bin/create_apps_json.sh
|
||||
#
|
||||
# =================================================================
|
||||
|
||||
# Uncomment the following line if you only want explicitly listed
|
||||
# apps to be available on your site
|
||||
|
||||
# restricted: ["boot", "launch", "antonclk", "health", "setting", "about", "widbat", "widbt", "widlock", "widid"]
|
||||
---
|
||||
{% comment %}
|
||||
=================================================================
|
||||
ALL THE INFORMATION INSIDE APPS.JSON HAS NOW BEEN MOVED
|
||||
|
||||
You'll find it inside a file called apps/yourapp/metadata.json
|
||||
|
||||
Otherwise nothing has changed. GitHub Pages will automatically
|
||||
create apps.json as your site is hosted, or if you're hosting
|
||||
yourself you can run bin/create_apps_json.sh
|
||||
|
||||
=================================================================
|
||||
{% endcomment %}
|
||||
{%- assign apps = site.static_files | where: "name", "metadata.json" -%}
|
||||
{%- if page.restricted == nil -%}
|
||||
{%- assign apps = site.static_files | where: "name", "metadata.json" | map: "path" -%}
|
||||
{%- else -%}
|
||||
{%- capture temp -%}
|
||||
{%- for app in page.restricted %} /apps/{{app}}/metadata.json {%- endfor -%}
|
||||
{%- endcapture -%}
|
||||
{%- assign apps = temp | strip | split: " " -%}
|
||||
{%- endif -%}
|
||||
|
||||
[
|
||||
|
||||
{%- include_relative {{ apps.first.path }} -%}
|
||||
{%- include_relative {{ apps.first }} -%}
|
||||
|
||||
{%- for app in apps offset:1 -%}
|
||||
,{%- include_relative {{ app.path }} -%}
|
||||
,{%- include_relative {{ app }} -%}
|
||||
{%- endfor -%}
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ function showMenu() {
|
|||
'': {
|
||||
'title': 'Set Date',
|
||||
'predraw': function() {
|
||||
datemenu.Date.value = settings.day;
|
||||
datemenu.Day.value = settings.day;
|
||||
datemenu.Month.value = settings.month;
|
||||
datemenu.Year.value = settings.year;
|
||||
}
|
||||
|
|
@ -64,4 +64,5 @@ function showMenu() {
|
|||
return E.showMenu(datemenu);
|
||||
}
|
||||
|
||||
showMenu();
|
||||
showMenu();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"description": "Shows you the days left until a certain date. Date can be set with a settings app and is written to a file.",
|
||||
"icon": "app.png",
|
||||
"tags": "",
|
||||
"supports": ["BANGLEJS"],
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"allow_emulator": false,
|
||||
"storage": [
|
||||
{"name":"daysl.app.js","url":"app.js"},
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"description": "Strike the clock on the hour. A great tool to remind you an hour has passed!",
|
||||
"icon": "app-icon.png",
|
||||
"tags": "tool,alarm",
|
||||
"supports": ["BANGLEJS"],
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name":"hourstrike.app.js","url":"app.js"},
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
0.01: Created
|
||||
0.02: Set sort order to -10 so always display in right hand corner
|
||||
0.03: Set sort order from the code
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
"shortName":"Battery Theme",
|
||||
"icon": "widbata.png",
|
||||
"screenshots": [{"url":"screenshot_widbata_1.png"}],
|
||||
"version":"0.02",
|
||||
"version":"0.03",
|
||||
"type": "widget",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"description": "Shows the current battery level status in the top right using the clocks colour theme",
|
||||
"tags": "widget,battery",
|
||||
"sortorder": -10,
|
||||
"storage": [
|
||||
{"name":"widbata.wid.js","url":"widbata.wid.js"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ setInterval(()=>WIDGETS["bata"].draw(), 60000);
|
|||
Bangle.on('lcdPower', function(on) {
|
||||
if (on) WIDGETS["bata"].draw();
|
||||
});
|
||||
WIDGETS["bata"]={area:"tr",width:27,draw:function() {
|
||||
WIDGETS["bata"]={area:"tr",sortorder:-10,width:27,draw:function() {
|
||||
var s = 26;
|
||||
var t = 13; // thickness
|
||||
var x = this.x, y = this.y;
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@
|
|||
0.03: Don't try to be fancy - just bail out on firmwares without a lock event
|
||||
0.04: Set sortorder to -1 so that widget always takes up the furthest left position
|
||||
0.05: Set sortorder to -10 so that others can take -1 etc
|
||||
0.06: Set sortorder to -10 in widget code
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
{
|
||||
"id": "widlock",
|
||||
"name": "Lock Widget",
|
||||
"version": "0.05",
|
||||
"version": "0.06",
|
||||
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
"tags": "widget,lock",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"sortorder": -10,
|
||||
"storage": [
|
||||
{"name":"widlock.wid.js","url":"widget.js"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
WIDGETS["lock"].width = Bangle.isLocked()?16:0;
|
||||
Bangle.drawWidgets();
|
||||
});
|
||||
WIDGETS["lock"]={area:"tl",width:Bangle.isLocked()?16:0,draw:function(w) {
|
||||
WIDGETS["lock"]={area:"tl",sortorder:10,width:Bangle.isLocked()?16:0,draw:function(w) {
|
||||
if (Bangle.isLocked())
|
||||
g.reset().drawImage(atob("DhABH+D/wwMMDDAwwMf/v//4f+H/h/8//P/z///f/g=="), w.x+1, w.y+4);
|
||||
}};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
0.01: First release
|
||||
0.02: Size widget after step count is reset
|
||||
0.03: set sortorder to -1
|
||||
0.04: set sortorder through code
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
"shortName":"Simple Pedometer",
|
||||
"icon": "screenshot_widpa.png",
|
||||
"screenshots": [{"url":"screenshot_widpa.png"}],
|
||||
"version":"0.03",
|
||||
"version":"0.04",
|
||||
"type": "widget",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in 12x16 font, requires firmware v2.11.21 or later",
|
||||
"tags": "widget,battery",
|
||||
"sortorder": -1,
|
||||
"storage": [
|
||||
{"name":"widpa.wid.js","url":"widpa.wid.js"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Bangle.on('step', function(s) { WIDGETS["widpa"].draw(); });
|
|||
Bangle.on('lcdPower', function(on) {
|
||||
if (on) WIDGETS["widpa"].draw();
|
||||
});
|
||||
WIDGETS["widpa"]={area:"tl",width:13,draw:function() {
|
||||
WIDGETS["widpa"]={area:"tl",sortorder:-1,width:13,draw:function() {
|
||||
if (!Bangle.isLCDOn()) return; // dont redraw if LCD is off
|
||||
var steps = Bangle.getHealthStatus("day").steps;
|
||||
var w = 1 + (steps.toString().length)*12;
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
0.02: Fixed widget id to wibpb, Size widget after step count is reset
|
||||
0.03: Fixed widget id in onStep() come on get it right!
|
||||
0.04: set sortorder to -1
|
||||
0.05: set sortorder through code
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
"shortName":"Lato Pedometer",
|
||||
"icon": "screenshot_widpb.png",
|
||||
"screenshots": [{"url":"screenshot_widpb.png"}],
|
||||
"version":"0.04",
|
||||
"version":"0.05",
|
||||
"type": "widget",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in the Lato font, requires firmware v2.11.21 or later",
|
||||
"tags": "widget,battery",
|
||||
"sortorder": -1,
|
||||
"storage": [
|
||||
{"name":"widpb.wid.js","url":"widpb.wid.js"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Bangle.on('step', function(s) { WIDGETS["widpb"].draw(); });
|
|||
Bangle.on('lcdPower', function(on) {
|
||||
if (on) WIDGETS["widpb"].draw();
|
||||
});
|
||||
WIDGETS["widpb"]={area:"tl",width:13,draw:function() {
|
||||
WIDGETS["widpb"]={area:"tl",sortorder:-1,width:13,draw:function() {
|
||||
if (!Bangle.isLCDOn()) return; // dont redraw if LCD is off
|
||||
var steps = Bangle.getHealthStatus("day").steps;
|
||||
var w = 1 + (steps.toString().length)*12;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ var SETTINGS = {
|
|||
var path = require('path');
|
||||
var ROOTDIR = path.join(__dirname, '..');
|
||||
var APPDIR = ROOTDIR+'/apps';
|
||||
var APPJSON = ROOTDIR+'/apps.json';
|
||||
var OUTFILE = ROOTDIR+'/firmware.js';
|
||||
var DEVICE = "BANGLEJS";
|
||||
var APPS = [ // IDs of apps to install
|
||||
|
|
@ -28,7 +27,6 @@ global.Const = {
|
|||
};
|
||||
|
||||
var AppInfo = require(ROOTDIR+"/core/js/appinfo.js");
|
||||
var appjson = JSON.parse(fs.readFileSync(APPJSON).toString());
|
||||
var appfiles = [];
|
||||
|
||||
function fileGetter(url) {
|
||||
|
|
@ -58,8 +56,11 @@ function fileGetter(url) {
|
|||
}
|
||||
|
||||
Promise.all(APPS.map(appid => {
|
||||
var app = appjson.find(app=>app.id==appid);
|
||||
if (app===undefined) throw new Error(`App ${appid} not found`);
|
||||
try {
|
||||
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "metadata.json").toString());
|
||||
} catch (e) {
|
||||
throw new Error(`App ${appid} not found`);
|
||||
}
|
||||
return AppInfo.getFiles(app, {
|
||||
fileGetter : fileGetter,
|
||||
settings : SETTINGS,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ var DEVICE = process.argv[2];
|
|||
var path = require('path');
|
||||
var ROOTDIR = path.join(__dirname, '..');
|
||||
var APPDIR = ROOTDIR+'/apps';
|
||||
var APPJSON = ROOTDIR+'/apps.json';
|
||||
var MINIFY = true;
|
||||
var OUTFILE, APPS;
|
||||
|
||||
|
|
@ -86,7 +85,6 @@ function atob(input) {
|
|||
}
|
||||
|
||||
var AppInfo = require(ROOTDIR+"/core/js/appinfo.js");
|
||||
var appjson = JSON.parse(fs.readFileSync(APPJSON).toString());
|
||||
var appfiles = [];
|
||||
|
||||
function fileGetter(url) {
|
||||
|
|
@ -134,8 +132,11 @@ function evaluateFile(file) {
|
|||
}
|
||||
|
||||
Promise.all(APPS.map(appid => {
|
||||
var app = appjson.find(app=>app.id==appid);
|
||||
if (app===undefined) throw new Error(`App ${appid} not found`);
|
||||
try {
|
||||
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "metadata.json").toString());
|
||||
} catch (e) {
|
||||
throw new Error(`App ${appid} not found`);
|
||||
}
|
||||
return AppInfo.getFiles(app, {
|
||||
fileGetter : fileGetter,
|
||||
settings : SETTINGS,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"//":"Czech language translations",
|
||||
"GLOBAL": {
|
||||
"//":"Translations that apply for all apps",
|
||||
"Alarm" : "Budík",
|
||||
"Hour" : "Hodina",
|
||||
"Hours" : "Hodiny",
|
||||
"Minute" : "Minuta",
|
||||
"Minutes" : "Minuty",
|
||||
"Second" : "Sekunda",
|
||||
"Seconds" : "Sekundy",
|
||||
"Month" : "Měsíc",
|
||||
"Enabled" : "Povoleno",
|
||||
"Background" : "Pozadí",
|
||||
"Connected" : "Připojeno",
|
||||
"Settings" : "Nastavení",
|
||||
"Save" : "Uložit",
|
||||
"Back" : "Zpět",
|
||||
"Repeat" : "Opakovat",
|
||||
"Delete" : "Smazat",
|
||||
"Sleep" : "Uspat",
|
||||
"Alarms" : "Budíky",
|
||||
"ALARM!" : "BUDÍK!",
|
||||
|
||||
" (repeat)" : " (opakovat)",
|
||||
"< Back" : "< Zpět",
|
||||
"> Delete" : "> Smazat",
|
||||
"> Save" : " > Uložit",
|
||||
"ALARM " : "BUDÍK ",
|
||||
|
||||
"Add Device" : "Přidat zařízení",
|
||||
"App Settings" : "Nast. Aplikací",
|
||||
"Apps" : "Aplikace"
|
||||
|
||||
},
|
||||
"alarm": {
|
||||
"//":"App-specific overrides",
|
||||
"Alarm/Timer" : "Budik/Časovač",
|
||||
"rpt" : "Opk.",
|
||||
"New Alarm" : "Nový budík",
|
||||
"New Timer" : "Nový časovač",
|
||||
"Auto snooze" : "Auto odložit"
|
||||
},
|
||||
"setting" : {
|
||||
"Quiet Mode" : "Tichý režim"
|
||||
|
||||
},
|
||||
"messages": {
|
||||
"Are you sure?" : "Opravdu?"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
[
|
||||
{"code":"en_GB","name":"British English","url":"en_GB.json"},
|
||||
{"code":"cs_CZ","name":"Czech","url":"cs_CZ.json"},
|
||||
{"code":"de_DE","name":"German","url":"de_DE.json"},
|
||||
{"code":"es_ES","name":"Spanish","url":"es_ES.json"},
|
||||
{"code":"fi_FI","name":"Finnish","url":"fi_FI.json"},
|
||||
|
|
|
|||
Loading…
Reference in New Issue