forked from FOSS/BangleApps
Added option for minification of apps. as mentioned on https://forum.espruino.com/conversations/381203/?offset=25#comment16758675
parent
572923c9ea
commit
6d7ffa72fa
2
core
2
core
|
@ -1 +1 @@
|
||||||
Subproject commit 278071c7e270eca596b5e2f3573241e1c295534a
|
Subproject commit 84c02f505f127071a1d19165bd960731cc9489f5
|
|
@ -145,6 +145,10 @@
|
||||||
<input type="checkbox" id="settings-pretokenise">
|
<input type="checkbox" id="settings-pretokenise">
|
||||||
<i class="form-icon"></i> Pretokenise apps before upload (smaller, faster apps)
|
<i class="form-icon"></i> Pretokenise apps before upload (smaller, faster apps)
|
||||||
</label>
|
</label>
|
||||||
|
<label class="form-switch">
|
||||||
|
<input type="checkbox" id="settings-minify">
|
||||||
|
<i class="form-icon"></i> Minify apps before upload (smaller, faster apps - BETA)
|
||||||
|
</label>
|
||||||
<label class="form-switch">
|
<label class="form-switch">
|
||||||
<input type="checkbox" id="settings-settime">
|
<input type="checkbox" id="settings-settime">
|
||||||
<i class="form-icon"></i> Always update time when we connect
|
<i class="form-icon"></i> Always update time when we connect
|
||||||
|
|
10
loader.js
10
loader.js
|
@ -206,7 +206,9 @@ window.addEventListener('load', (event) => {
|
||||||
// Button to install all default apps in one go
|
// Button to install all default apps in one go
|
||||||
document.getElementById("reinstallall").addEventListener("click",event=>{
|
document.getElementById("reinstallall").addEventListener("click",event=>{
|
||||||
var promise = showPrompt("Reinstall","Really re-install all apps?").then(() => {
|
var promise = showPrompt("Reinstall","Really re-install all apps?").then(() => {
|
||||||
getInstalledApps().then(installedapps => {
|
Comms.reset().then(_ =>
|
||||||
|
getInstalledApps()
|
||||||
|
).then(installedapps => {
|
||||||
console.log(installedapps);
|
console.log(installedapps);
|
||||||
var promise = Promise.resolve();
|
var promise = Promise.resolve();
|
||||||
installedapps.forEach(app => {
|
installedapps.forEach(app => {
|
||||||
|
@ -216,10 +218,12 @@ window.addEventListener('load', (event) => {
|
||||||
app = appJSON.find(a => a.id==oldApp.id);
|
app = appJSON.find(a => a.id==oldApp.id);
|
||||||
if (!app)
|
if (!app)
|
||||||
return console.log(`Ignoring ${oldApp.id} as not found`);
|
return console.log(`Ignoring ${oldApp.id} as not found`);
|
||||||
promise = promise.then(() => updateApp(app));
|
promise = promise.then(() => updateApp(app, {noReset:true, noFinish:true}));
|
||||||
});
|
});
|
||||||
return promise;
|
return promise;
|
||||||
}).catch(err=>{
|
}).then( _ =>
|
||||||
|
Comms.showUploadFinished()
|
||||||
|
).catch(err=>{
|
||||||
Progress.hide({sticky:true});
|
Progress.hide({sticky:true});
|
||||||
showToast("App re-install failed, "+err,"error");
|
showToast("App re-install failed, "+err,"error");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue