Help submenu

This commit seeks to improve the paltry help menu item. It breaks the "try to have at least three items in a submenu" rule in anticipation of an upcoming quickstart guide and show quickstart guide setting. This guide will explain that (soon) you will have to swipe south at the top of the screen to activate the menu.

Also see the somewhat related #1371, which would also go in the submenu.
pull/2726/head
Frans de Jonge 7 years ago committed by Qingping Hou
parent 2e43faedfe
commit a8b3873c8c

@ -2,6 +2,7 @@ local Device = require("device")
local InfoMessage = require("ui/widget/infomessage")
local UIManager = require("ui/uimanager")
local _ = require("gettext")
local T = require("ffi/util").template
local common_info = {}
@ -10,19 +11,33 @@ if Device:isKindle() or Device:isKobo() or Device:isPocketBook()
local OTAManager = require("ui/otamanager")
common_info.ota_update = OTAManager:getOTAMenuTable()
end
local version = io.open("git-rev", "r"):read()
common_info.version = {
text = _("Version"),
callback = function()
UIManager:show(InfoMessage:new{
text = io.open("git-rev", "r"):read(),
text = version,
})
end
}
common_info.help = {
text = _("Help"),
}
common_info.about = {
text = _("About"),
callback = function()
UIManager:show(InfoMessage:new{
text = T(_("KOReader %1\n\nA document viewer for E Ink devices.\n\nLicensed under Affero GPL v3. All dependencies are free software.\n\nhttp://koreader.rocks/"), version),
})
end
}
common_info.report_bug = {
text = _("Report a bug"),
callback = function()
local model = Device.model
UIManager:show(InfoMessage:new{
text = _("Please report bugs to \nhttps://github.com/koreader/koreader/issues"),
text = T(_("Please report bugs to \nhttps://github.com/koreader/koreader/issues\n\nVersion:\n%1\n\nDetected device:\n%2"),
version, model),
})
end
}

@ -61,6 +61,11 @@ local order = {
"----------------------------",
"exit",
},
help = {
"report_bug",
"----------------------------",
"about",
},
}
return order

@ -74,6 +74,11 @@ local order = {
"----------------------------",
"exit",
},
help = {
"report_bug",
"----------------------------",
"about",
},
}
return order

Loading…
Cancel
Save