mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Bangle.js: Change order of items in the Recovery Menu (hold BTN at boot) to put more common options first
This commit is contained in:
parent
e3505a6f57
commit
bbb6c89ebe
@ -8,6 +8,7 @@
|
||||
Ensure default args for arrow functions fail with error `(a,b=3)=>a+b` now fails (until default args get added)
|
||||
nRF52: bootloader asks for connection interval 7.5->30ms now, not just 15ms. Should improve DFU on iOS 16 which doesn't honour 15ms request
|
||||
Fix unicode in object keys when UTF8 support enabled, eg. {'\u00e4':1}
|
||||
Bangle.js: Change order of items in the Recovery Menu (hold BTN at boot) to put more common options first
|
||||
|
||||
2v19 : Fix Object.values/entries for numeric keys after 2v18 regression (fix #2375)
|
||||
nRF52: for SD>5 use static buffers for advertising and scan response data (#2367)
|
||||
|
||||
@ -7,6 +7,35 @@
|
||||
NRF.removeAllListeners();
|
||||
Bangle.setLCDBrightness(1);
|
||||
E.showMenu({"":{title:"Recovery"},
|
||||
"Clean Boot": () => {
|
||||
reset();
|
||||
},
|
||||
"Reboot": () => {
|
||||
E.reboot();
|
||||
},
|
||||
"Turn Off": () => {
|
||||
Bangle.off();
|
||||
},
|
||||
"Factory Reset": () => {
|
||||
E.showPrompt("Are you sure?\nThis will remove all data.",{title:"Factory Reset"}).then(ok => {
|
||||
if (!ok) return Bangle.showRecoveryMenu();
|
||||
E.showMessage("Resetting");
|
||||
Bangle.setLCDTimeout(0);
|
||||
if(!NRF.getSecurityStatus().connected)
|
||||
Terminal.setConsole();
|
||||
Bangle.factoryReset();
|
||||
});
|
||||
},
|
||||
"Exit": () => {
|
||||
if (require("Storage").list().length>0) {
|
||||
E.showMessage("Loading...");
|
||||
if(!NRF.getSecurityStatus().connected)
|
||||
Terminal.setConsole();
|
||||
load();
|
||||
} else {
|
||||
E.reboot();
|
||||
}
|
||||
},
|
||||
"Attempt Compact": () => {
|
||||
E.showMessage("Compacting...\nMay take\n5 min.");
|
||||
if(!NRF.getSecurityStatus().connected)
|
||||
@ -18,34 +47,5 @@
|
||||
setTimeout(load,1000);
|
||||
eval(require("Storage").read("bootupdate.js"));
|
||||
},
|
||||
"Factory Reset": () => {
|
||||
E.showPrompt("Are you sure?\nThis will remove all data.",{title:"Factory Reset"}).then(ok => {
|
||||
if (!ok) return Bangle.showRecoveryMenu();
|
||||
E.showMessage("Resetting");
|
||||
Bangle.setLCDTimeout(0);
|
||||
if(!NRF.getSecurityStatus().connected)
|
||||
Terminal.setConsole();
|
||||
Bangle.factoryReset();
|
||||
});
|
||||
},
|
||||
"Clean Boot": () => {
|
||||
reset();
|
||||
},
|
||||
"Reboot": () => {
|
||||
E.reboot();
|
||||
},
|
||||
"Turn Off": () => {
|
||||
Bangle.off();
|
||||
},
|
||||
"Exit": () => {
|
||||
if (require("Storage").list().length>0) {
|
||||
E.showMessage("Loading...");
|
||||
if(!NRF.getSecurityStatus().connected)
|
||||
Terminal.setConsole();
|
||||
load();
|
||||
} else {
|
||||
E.reboot();
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user