diff --git a/pocket/pocket.lua b/pocket/pocket.lua index e73c3b1..5e6798e 100644 --- a/pocket/pocket.lua +++ b/pocket/pocket.lua @@ -286,7 +286,6 @@ function pocket.init_nav(smem) end end - -- load a given app ---@param app_id POCKET_APP_ID function nav.load_app(app_id) diff --git a/pocket/ui/main.lua b/pocket/ui/main.lua index 524a67c..4a33327 100644 --- a/pocket/ui/main.lua +++ b/pocket/ui/main.lua @@ -41,7 +41,7 @@ local function init(main) local main_pane = Div{parent=main,x=1,y=2} - -- window header message + -- window header message and connection status TextBox{parent=main,y=1,text="EARLY ACCESS ALPHA S C ",alignment=ALIGN.LEFT,height=1,fg_bg=style.header} local svr_conn = SignalBar{parent=main,y=1,x=22,compact=true,colors_low_med=cpair(colors.red,colors.yellow),disconnect_color=colors.lightGray,fg_bg=cpair(colors.green,colors.gray)} local crd_conn = SignalBar{parent=main,y=1,x=26,compact=true,colors_low_med=cpair(colors.red,colors.yellow),disconnect_color=colors.lightGray,fg_bg=cpair(colors.green,colors.gray)} @@ -49,12 +49,10 @@ local function init(main) db.ps.subscribe("svr_conn_quality", svr_conn.set_value) db.ps.subscribe("crd_conn_quality", crd_conn.set_value) - --#region main page panel panes & sidebar - local page_div = Div{parent=main_pane,x=4,y=1} + -- create all the apps & pages home_page(page_div) - unit_app(page_div) guide_app(page_div) loader_app(page_div) @@ -62,6 +60,7 @@ local function init(main) diag_apps(page_div) dummy_app(page_div) + -- verify all apps were created assert(util.table_len(db.nav.get_containers()) == APP_ID.NUM_APPS, "app IDs were not sequential or some apps weren't registered") db.nav.set_pane(MultiPane{parent=page_div,x=1,y=1,panes=db.nav.get_containers()}) @@ -70,8 +69,6 @@ local function init(main) PushButton{parent=main_pane,x=1,y=19,text="\x1b",min_width=3,fg_bg=cpair(colors.white,colors.gray),active_fg_bg=cpair(colors.gray,colors.black),callback=db.nav.nav_up} db.nav.open_app(APP_ID.ROOT) - - --#endregion end return init