Add config path args to MiloRemote

Allowing to connect to multiple Milo system from one NI
Example:
> MiloRemote base
> MiloRemote shop
This commit is contained in:
Anavrins
2020-08-14 01:51:45 -04:00
parent 153c1ac4a2
commit db007af3ea
2 changed files with 12 additions and 8 deletions

View File

@@ -5,10 +5,10 @@ local Util = require('opus.util')
local colors = _G.colors
local fs = _G.fs
local STARTUP_FILE = 'usr/autorun/miloRemote.lua'
local context = ({ ... })[1]
local STARTUP_FILE = 'usr/autorun/'..context.configPath..'.lua'
local setup = UI.SlideOut {
titleBar = UI.TitleBar {
title = 'Remote Setup',
@@ -59,7 +59,7 @@ function setup:eventHandler(event)
self.statusBar:setStatus(event.focused.help)
elseif event.type == 'form_complete' then
Config.update('miloRemote', context.state)
Config.update(context.configPath, context.state)
self:hide()
context.page:refresh('list')
context.page.grid:draw()