#556 WIP dynamic tank views in unit app
This commit is contained in:
@@ -9,6 +9,7 @@ local pocket = require("pocket.pocket")
|
||||
|
||||
local style = require("pocket.ui.style")
|
||||
|
||||
local dyn_tank = require("pocket.ui.pages.dynamic_tank")
|
||||
local boiler = require("pocket.ui.pages.unit_boiler")
|
||||
local reactor = require("pocket.ui.pages.unit_reactor")
|
||||
local turbine = require("pocket.ui.pages.unit_turbine")
|
||||
@@ -92,6 +93,10 @@ local function new_view(root)
|
||||
table.insert(list, { label = "T-" .. i, color = core.cpair(colors.black, colors.lightGray), callback = nav_links[id].turbine[i] })
|
||||
end
|
||||
|
||||
if #unit.tank_data_tbl > 0 then
|
||||
table.insert(list, { label = "DYN", color = core.cpair(colors.black, colors.lightGray), callback = nav_links[id].d_tank })
|
||||
end
|
||||
|
||||
app.set_sidebar(list)
|
||||
end
|
||||
|
||||
@@ -363,6 +368,15 @@ local function new_view(root)
|
||||
|
||||
--#endregion
|
||||
|
||||
--#region Dynamic Tank Tab
|
||||
|
||||
if #unit.tank_data_tbl > 0 then
|
||||
local tank_pane = Div{parent=page_div}
|
||||
nav_links[i].d_tank = dyn_tank(app, u_page, panes, tank_pane, 1, unit.tank_ps_tbl[1], update)
|
||||
end
|
||||
|
||||
--#endregion
|
||||
|
||||
util.nop()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user