milo: UI cleanup
This commit is contained in:
@@ -11,12 +11,11 @@ local monitor = context.storage:getSingleNode('activity')
|
||||
|
||||
--[[ Configuration Page ]]--
|
||||
local template =
|
||||
[[%sDisplays the amount of items entering or leaving storage%s
|
||||
[[%sDisplays the amount of items entering or leaving storage.%s
|
||||
|
||||
Right-clicking on the activity monitor will reset the totals.
|
||||
|
||||
%sMilo must be restarted to activate diplay.
|
||||
]]
|
||||
%sMilo must be restarted to activate diplay.]]
|
||||
|
||||
local activityWizardPage = UI.Window {
|
||||
title = 'Activity Monitor',
|
||||
@@ -24,6 +23,7 @@ local activityWizardPage = UI.Window {
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
marginRight = 0,
|
||||
value = string.format(template, Ansi.yellow, Ansi.reset, Ansi.orange),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ local itemDB = require('itemDB')
|
||||
local UI = require('ui')
|
||||
local Util = require('util')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
|
||||
local exportView = UI.Window {
|
||||
@@ -20,17 +21,18 @@ local exportView = UI.Window {
|
||||
},
|
||||
},
|
||||
text = UI.Text {
|
||||
x = 2, y = -2,
|
||||
x = 3, y = -2,
|
||||
value = 'Slot',
|
||||
textColor = colors.black,
|
||||
},
|
||||
slots = UI.Chooser {
|
||||
x = 7, y = -2,
|
||||
x = 8, y = -2,
|
||||
width = 7,
|
||||
nochoice = 'All',
|
||||
help = 'Export to this slot',
|
||||
},
|
||||
add = UI.Button {
|
||||
x = 15, y = -2,
|
||||
x = 16, y = -2,
|
||||
text = '+', event = 'add_entry', help = 'Add',
|
||||
},
|
||||
remove = UI.Button {
|
||||
|
||||
@@ -2,6 +2,7 @@ local itemDB = require('itemDB')
|
||||
local UI = require('ui')
|
||||
local Util = require('util')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
|
||||
local importView = UI.Window {
|
||||
@@ -20,17 +21,18 @@ local importView = UI.Window {
|
||||
},
|
||||
},
|
||||
text = UI.Text {
|
||||
x = 2, y = -2,
|
||||
x = 3, y = -2,
|
||||
value = 'Slot',
|
||||
textColor = colors.black,
|
||||
},
|
||||
slots = UI.Chooser {
|
||||
x = 7, y = -2,
|
||||
x = 8, y = -2,
|
||||
width = 7,
|
||||
nochoice = 'All',
|
||||
help = 'Import from this slot',
|
||||
},
|
||||
add = UI.Button {
|
||||
x = 15, y = -2,
|
||||
x = 16, y = -2,
|
||||
text = '+', event = 'add_entry', help = 'Add',
|
||||
},
|
||||
remove = UI.Button {
|
||||
|
||||
@@ -14,8 +14,7 @@ local monitor = context.storage:getSingleNode('jobs')
|
||||
local template =
|
||||
[[%sDisplays the crafting progress%s
|
||||
|
||||
%sMilo must be restarted to activate diplay.
|
||||
]]
|
||||
%sMilo must be restarted to activate diplay.]]
|
||||
|
||||
local jobsWizardPage = UI.Window {
|
||||
title = 'Crafting Monitor',
|
||||
@@ -23,6 +22,7 @@ local jobsWizardPage = UI.Window {
|
||||
backgroundColor = colors.cyan,
|
||||
[1] = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, ey = -2,
|
||||
marginRight = 0,
|
||||
value = string.format(template, Ansi.yellow, Ansi.reset, Ansi.orange),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ local wizardPage = UI.Window {
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
form = UI.Form {
|
||||
x = 1, y = 3, ex = -1, ey = -2,
|
||||
x = 2, ex = -2, y = 3, ey = -2,
|
||||
manualControls = true,
|
||||
[1] = UI.Checkbox {
|
||||
formLabel = 'Import', formKey = 'importEnder',
|
||||
@@ -26,7 +26,7 @@ local wizardPage = UI.Window {
|
||||
},
|
||||
},
|
||||
userInfo = UI.TextArea {
|
||||
x = 2, ex = -2, y = 2, height = 1,
|
||||
x = 3, ex = -2, y = 2, height = 2,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,11 @@ local function client(socket)
|
||||
break
|
||||
end
|
||||
|
||||
if data.request == 'list' then
|
||||
if data.request == 'scan' then -- full scan of all inventories
|
||||
local items = Milo:mergeResources(Milo:listItems(true))
|
||||
socket:write(items)
|
||||
|
||||
elseif data.request == 'list' then
|
||||
local items = Milo:mergeResources(Milo:listItems())
|
||||
socket:write(items)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ local storageView = UI.Window {
|
||||
index = 2,
|
||||
backgroundColor = colors.cyan,
|
||||
form = UI.Form {
|
||||
x = 1, y = 1, ex = -1, ey = -2,
|
||||
x = 2, ex = -2, y = 1, ey = -2,
|
||||
manualControls = true,
|
||||
[1] = UI.TextEntry {
|
||||
formLabel = 'Priority', formKey = 'priority',
|
||||
@@ -28,6 +28,7 @@ local storageView = UI.Window {
|
||||
[3] = UI.TextArea {
|
||||
x = 12, ex = -2, y = 4,
|
||||
textColor = colors.yellow,
|
||||
marginRight = 0,
|
||||
value = 'Only specify if you are manually taking items out of this inventory. Value should be > 10',
|
||||
},
|
||||
},
|
||||
@@ -67,7 +68,7 @@ local lockView = UI.Window {
|
||||
index = 3,
|
||||
backgroundColor = colors.cyan,
|
||||
form = UI.Form {
|
||||
x = 1, y = 1, ex = -1, ey = 3,
|
||||
x = 2, ex = -2, y = 1, ey = 3,
|
||||
manualControls = true,
|
||||
[1] = UI.Checkbox {
|
||||
formLabel = 'Locked', formKey = 'lockWith',
|
||||
@@ -79,11 +80,12 @@ local lockView = UI.Window {
|
||||
},
|
||||
},
|
||||
grid = UI.ScrollingGrid {
|
||||
x = 2, ex = -2, y = 4, ey = -2,
|
||||
x = 2, ex = -2, y = 5, ey = -2,
|
||||
columns = {
|
||||
{ heading = 'Name', key = 'displayName' },
|
||||
},
|
||||
sortColumn = 'displayName',
|
||||
disableHeader = true,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ local wizardPage = UI.Window {
|
||||
value = [[ Items can be automatically dropped from this storage.]],
|
||||
},
|
||||
form = UI.Form {
|
||||
x = 1, y = 4, ex = -1, ey = -2,
|
||||
x = 2, ex = -2, y = 4, ey = -2,
|
||||
manualControls = true,
|
||||
[1] = UI.Checkbox {
|
||||
formLabel = 'Drop', formKey = 'drop',
|
||||
@@ -25,7 +25,7 @@ local wizardPage = UI.Window {
|
||||
},
|
||||
[2] = UI.Chooser {
|
||||
width = 9,
|
||||
formLabel = 'Drop direction', formKey = 'dropDirection',
|
||||
formLabel = 'Direction', formKey = 'dropDirection',
|
||||
nochoice = 'Down',
|
||||
choices = {
|
||||
{ name = 'Down', value = 'down' },
|
||||
|
||||
Reference in New Issue
Block a user