mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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.
46 lines
1.3 KiB
Lua
46 lines
1.3 KiB
Lua
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 = {}
|
|
|
|
if Device:isKindle() or Device:isKobo() or Device:isPocketBook()
|
|
or Device:isAndroid() then
|
|
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 = 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 = T(_("Please report bugs to \nhttps://github.com/koreader/koreader/issues\n\nVersion:\n%1\n\nDetected device:\n%2"),
|
|
version, model),
|
|
})
|
|
end
|
|
}
|
|
|
|
return common_info
|