2023-12-22 16:12:47 +00:00
|
|
|
--
|
|
|
|
-- Unit Overview Page
|
|
|
|
--
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-12-22 16:12:47 +00:00
|
|
|
local iocontrol = require("pocket.iocontrol")
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-12-22 16:12:47 +00:00
|
|
|
local core = require("graphics.core")
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-12-22 16:12:47 +00:00
|
|
|
local Div = require("graphics.elements.div")
|
|
|
|
local TextBox = require("graphics.elements.textbox")
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-10-04 03:16:46 +00:00
|
|
|
local ALIGN = core.ALIGN
|
2023-04-16 19:05:28 +00:00
|
|
|
|
|
|
|
-- new unit page view
|
|
|
|
---@param root graphics_element parent
|
|
|
|
local function new_view(root)
|
2023-12-22 16:12:47 +00:00
|
|
|
local db = iocontrol.get_db()
|
|
|
|
|
2023-04-16 19:05:28 +00:00
|
|
|
local main = Div{parent=root,x=1,y=1}
|
|
|
|
|
2024-04-13 18:47:20 +00:00
|
|
|
local app = db.nav.register_app(iocontrol.APP_ID.UNITS, main)
|
|
|
|
app.new_page(nil, function () end)
|
|
|
|
|
2024-04-14 19:28:38 +00:00
|
|
|
TextBox{parent=main,y=2,text="UNITS",height=1,alignment=ALIGN.CENTER}
|
|
|
|
|
|
|
|
TextBox{parent=main,y=4,text="work in progress",height=1,alignment=ALIGN.CENTER}
|
2023-04-16 19:05:28 +00:00
|
|
|
|
|
|
|
return main
|
|
|
|
end
|
|
|
|
|
|
|
|
return new_view
|