1
0
mirror of https://github.com/20kdc/OC-KittenOS.git synced 2024-11-23 10:58:06 +11:00

Fix app-flash bugs

EEPROM names/addresses are now always at least partially visible,
 and EEPROM regulations on labels no longer block editing.
This commit is contained in:
20kdc 2018-06-12 01:34:02 +01:00
parent 7ca2c26979
commit 3ba0792dfe
2 changed files with 5 additions and 3 deletions

View File

@ -139,7 +139,7 @@ return {
},
["app-flash"] = {
desc = "KittenOS NEO EEPROM Flasher",
v = 2,
v = 5,
deps = {
"neo"
},

View File

@ -20,12 +20,14 @@ local busy = false
local regenCore
local function regenLabeller(set, get, wd)
local tx = get()
return wd, 2, nil, neoux.tcwindow(wd, 1, {
neoux.tcfield(1, 1, wd, function (nt)
if nt then
tx = nt
set(nt)
end
return get()
return tx
end)
}, function (w)
busy = false
@ -39,7 +41,7 @@ function regenCore()
for v in eeprom.list() do
local lbl = unicode.safeTextFormat(v.getLabel())
table.insert(elems, neoux.tcrawview(1, l, {
v.address:sub(1, 8) .. " " .. lbl
require("fmttext").pad(v.address:sub(1, 8) .. " " .. lbl, 25, false, true)
}))
table.insert(elems, neoux.tcbutton(1, l + 1, "get", function (window)
if busy then return end