Tidy up QR code customiser. No change to app, but now we don't have to store icon in HTML

pull/391/head
Gordon Williams 2020-05-06 09:50:47 +01:00
parent c2f9e7bf6f
commit f5480bfa0f
4 changed files with 5 additions and 6 deletions

View File

@ -534,14 +534,14 @@
},
{ "id": "qrcode",
"name": "Custom QR Code",
"icon": "qrcode.png",
"icon": "app.png",
"version":"0.01",
"description": "Use this to upload a customised QR code to Bangle.js",
"tags": "",
"custom": "qrcode.html",
"tags": "qrcode",
"custom": "custom.html",
"storage": [
{"name":"qrcode.app.js"},
{"name":"qrcode.img"}
{"name":"qrcode.img","url":"app-icon.js","evaluate":true}
]
},
{ "id": "beer",

1
apps/qrcode/app-icon.js Normal file
View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("mEwgP/AEX8gE8nkAn4FSngCWF6xfYDgIABHAQFPDQXD4YgDApxNDMooFOAQIdDAqIvWfcYA="))

View File

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

View File

@ -41,11 +41,9 @@ g.setColor(0,0,0);
g.drawString(url,120,230);
g.setColor(1,1,1);
`;
var icon = `require("heatshrink").decompress(atob("mEwgP/AEX8gE8nkAn4FSngCWF6xfYDgIABHAQFPDQXD4YgDApxNDMooFOAQIdDAqIvWfcYA="))`;
sendCustomizedApp({
storage:[
{name:"qrcode.app.js", content:app},
{name:"qrcode.img", content:icon, evaluate:true},
]
});