#535 added startup button to configurators

This commit is contained in:
Mikayla Fischler
2024-11-09 11:56:56 -05:00
parent 764638c212
commit 8439e02586
11 changed files with 66 additions and 21 deletions

View File

@@ -51,6 +51,7 @@ style.btn_dis_fg_bg = cpair(colors.lightGray, colors.white)
---@class _svr_cfg_tool_ctl
local tool_ctl = {
launch_startup = false,
ask_config = false,
has_config = false,
viewing_config = false,
@@ -201,9 +202,17 @@ local function config_view(display)
main_pane.set_value(5)
end
local function startup()
tool_ctl.launch_startup = true
exit()
end
PushButton{parent=main_page,x=2,y=17,min_width=6,text="Exit",callback=exit,fg_bg=cpair(colors.black,colors.red),active_fg_bg=btn_act_fg_bg}
tool_ctl.color_cfg = PushButton{parent=main_page,x=23,y=17,min_width=15,text="Color Options",callback=jump_color,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg,dis_fg_bg=btn_dis_fg_bg}
PushButton{parent=main_page,x=39,y=17,min_width=12,text="Change Log",callback=function()main_pane.set_value(7)end,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
local start_btn = PushButton{parent=main_page,x=42,y=17,min_width=9,text="Startup",callback=startup,fg_bg=cpair(colors.black,colors.green),active_fg_bg=btn_act_fg_bg,dis_fg_bg=btn_dis_fg_bg}
tool_ctl.color_cfg = PushButton{parent=main_page,x=36,y=y_start,min_width=15,text="Color Options",callback=jump_color,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg,dis_fg_bg=btn_dis_fg_bg}
PushButton{parent=main_page,x=39,y=y_start+2,min_width=12,text="Change Log",callback=function()main_pane.set_value(7)end,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}
if tool_ctl.ask_config then start_btn.disable() end
if not tool_ctl.has_config then
tool_ctl.view_cfg.disable()
@@ -308,7 +317,7 @@ function configurator.configure(ask_config)
println("configurator error: " .. error)
end
return status, error
return status, error, tool_ctl.launch_startup
end
return configurator

View File

@@ -22,7 +22,7 @@ local supervisor = require("supervisor.supervisor")
local svsessions = require("supervisor.session.svsessions")
local SUPERVISOR_VERSION = "v1.5.14"
local SUPERVISOR_VERSION = "v1.5.15"
local println = util.println
local println_ts = util.println_ts