[UX] Add exit menu (#3167)

* fixes #2898 (prevents accidentally triggering reboot or poweroff)
  Add ConfirmBox before reboot/power off
* increases clarity by preventing second page
* add "sleep" menu entry
* Add exit menu hold callback
This commit is contained in:
Frans de Jonge
2017-09-03 15:40:50 +02:00
committed by GitHub
parent c24d75f18c
commit 177485f84f
6 changed files with 61 additions and 15 deletions

View File

@@ -85,17 +85,14 @@ local order = {
"book_status",
"book_info",
"----------------------------",
"system_statistics",
"----------------------------",
"ota_update", --[[ if Device:isKindle() or Device:isKobo() or
Device:isPocketBook() or Device:isAndroid() ]]--
"version",
"help",
"system_statistics",
"----------------------------",
"restart_koreader",
"poweroff", -- if Device:isKobo()
"reboot", -- if Device:isKobo()
"----------------------------",
"exit",
"exit_menu",
},
help = {
"quickstart_guide",
@@ -104,6 +101,15 @@ local order = {
"----------------------------",
"about",
},
exit_menu = {
"restart_koreader",
"----------------------------",
"sleep", -- if Device:isKindle() or Device:isKobo()
"poweroff", -- if Device:isKobo()
"reboot", -- if Device:isKobo()
"----------------------------",
"exit",
}
}
return order