unit detail view in div and hide waiting indicator on connect

This commit is contained in:
Mikayla Fischler
2022-09-10 15:15:24 -04:00
parent 98c826e762
commit 4275c9d408
2 changed files with 44 additions and 41 deletions

View File

@@ -24,12 +24,13 @@ local border = core.graphics.border
local function init(monitor, id)
local main = DisplayBox{window=monitor,fg_bg=style.root}
unit_wait(main, 20)
local waiting = unit_wait(main, 20)
-- block waiting for initial status
local function show_view()
local unit = iocontrol.get_db().units[id] ---@type ioctl_entry
if unit.reactor_data.last_status_update ~= nil then
waiting.hide()
unit_detail(main, id)
else
tcallbackdsp.dispatch(1, show_view)