Bangle.js: NEEDS NEW APPS - Move away from using first char as file descriptor and use file extensions insteadMove away froBangle.js: NEEDS NEW APPS - Move away from using first char as file descriptor and use file extensions instead

This commit is contained in:
Gordon Williams 2020-02-28 10:18:55 +00:00
parent 2cee4d96bb
commit e4904f49d7
5 changed files with 8 additions and 7 deletions

View File

@ -103,6 +103,7 @@
Remove header.replacement in 'Storage' lib and just zero header.name
- increase filename to 28 bytes, but file search now more efficient
Bangle.js: Increase Storage area to full 4MB of flash
Bangle.js: NEEDS NEW APPS - Move away from using first char as file descriptor and use file extensions instead
2v04 : Allow \1..\9 escape codes in RegExp
ESP8266: reading storage is not working for boot from user2 (fix #1507)

View File

@ -1,5 +1,5 @@
(function() {
global.WIDGETPOS={tl:32,tr:g.getWidth()-32,bl:32,br:g.getWidth()-32};
global.WIDGETS={};
require("Storage").list().filter(a=>a[0]=='=').forEach(widget=>eval(require("Storage").read(widget)));
})
require("Storage").list().filter(a=>a.endsWith('.wid.js')).forEach(widget=>eval(require("Storage").read(widget)));
})

View File

@ -1 +1 @@
(function(){global.WIDGETPOS={tl:32,tr:g.getWidth()-32,bl:32,br:g.getWidth()-32};global.WIDGETS={};require("Storage").list().filter(function(a){return"="==a[0]}).forEach(function(a){return eval(require("Storage").read(a))})})
(function(){global.WIDGETPOS={tl:32,tr:g.getWidth()-32,bl:32,br:g.getWidth()-32};global.WIDGETS={};require("Storage").list().filter(a=>a.endsWith('.wid.js')).forEach(a=>eval(require("Storage").read(a)))})

View File

@ -1,7 +1,7 @@
(function() {
var l = require("Storage").list().filter(a=>a[0]=='+').map(app=>{
var l = require("Storage").list().filter(a=>a.endsWith(".info")).map(app=>{
try { return require("Storage").readJSON(app); } catch (e) {}
}).find(app=>app.type=="launch");
if (l) load(l.src);
else E.showMessage("Launcher\nnot found");
})
})

View File

@ -1,7 +1,7 @@
(function() {
var l = require("Storage").list().filter(a=>a[0]=='+').map(app=>{
var l = require("Storage").list().filter(a=>a.endsWith(".info")).map(app=>{
try { return require("Storage").readJSON(app); } catch (e) {}
}).find(app=>app.type=="launch");
if (l) load(l.src);
else E.showMessage("Launcher\nnot found");
})
})