2
0
mirror of https://github.com/koreader/koreader synced 2024-11-16 06:12:56 +00:00
koreader/frontend/ui/elements/common_info_menu_table.lua
2016-03-13 23:43:05 +08:00

31 lines
833 B
Lua

local Device = require("device")
local InfoMessage = require("ui/widget/infomessage")
local UIManager = require("ui/uimanager")
local _ = require("gettext")
local common_info = {}
if Device:isKindle() or Device:isKobo() or Device:isPocketBook()
or Device:isAndroid() then
local OTAManager = require("ui/otamanager")
table.insert(common_info, OTAManager:getOTAMenuTable())
end
table.insert(common_info, {
text = _("Version"),
callback = function()
UIManager:show(InfoMessage:new{
text = io.open("git-rev", "r"):read(),
})
end
})
table.insert(common_info, {
text = _("Help"),
callback = function()
UIManager:show(InfoMessage:new{
text = _("Please report bugs to \nhttps://github.com/koreader/koreader/issues"),
})
end
})
return common_info