mirror of https://github.com/kepler155c/opus
term bugs + kiosk config
This commit is contained in:
parent
da35988d50
commit
c307f4020c
|
@ -132,7 +132,7 @@ function Entry:process(ie)
|
||||||
|
|
||||||
elseif ie.code == 'mouse_click' then
|
elseif ie.code == 'mouse_click' then
|
||||||
-- need starting x passed in instead of hardcoding 3
|
-- need starting x passed in instead of hardcoding 3
|
||||||
self.pos = math.min(ie.x - 3 + self.scroll, #self.value)
|
self.pos = math.max(0, math.min(ie.x - 3 + self.scroll, #self.value))
|
||||||
updated = true
|
updated = true
|
||||||
|
|
||||||
elseif ie.code == 'mouse_rightclick' then
|
elseif ie.code == 'mouse_rightclick' then
|
||||||
|
|
|
@ -323,8 +323,9 @@ function Terminal.copy(it, ot)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Terminal.mirror(ct, dt)
|
function Terminal.mirror(ct, dt)
|
||||||
|
local t = { }
|
||||||
for k,f in pairs(ct) do
|
for k,f in pairs(ct) do
|
||||||
ct[k] = function(...)
|
t[k] = function(...)
|
||||||
local ret = { f(...) }
|
local ret = { f(...) }
|
||||||
if dt[k] then
|
if dt[k] then
|
||||||
dt[k](...)
|
dt[k](...)
|
||||||
|
@ -332,6 +333,7 @@ function Terminal.mirror(ct, dt)
|
||||||
return table.unpack(ret)
|
return table.unpack(ret)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
function Terminal.readPassword(prompt)
|
function Terminal.readPassword(prompt)
|
||||||
|
|
|
@ -30,7 +30,7 @@ function tab:enable()
|
||||||
|
|
||||||
for k,v in pairs(device) do
|
for k,v in pairs(device) do
|
||||||
if v.type == 'monitor' then
|
if v.type == 'monitor' then
|
||||||
table.insert(choices, { name = k, value = v.name })
|
table.insert(choices, { name = k, value = v.side })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,8 +44,12 @@ end
|
||||||
|
|
||||||
function tab:eventHandler(event)
|
function tab:eventHandler(event)
|
||||||
if event.type == 'choice_change' then
|
if event.type == 'choice_change' then
|
||||||
settings.set('kiosk.monitor', self.form.monitor.value)
|
if self.form.monitor.value then
|
||||||
settings.set('kiosk.textscale', self.form.textScale.value)
|
settings.set('kiosk.monitor', self.form.monitor.value)
|
||||||
|
end
|
||||||
|
if self.form.textScale.value then
|
||||||
|
settings.set('kiosk.textscale', self.form.textScale.value)
|
||||||
|
end
|
||||||
settings.save('.settings')
|
settings.save('.settings')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -139,7 +139,7 @@ function multishell.openTab(tab)
|
||||||
if err then
|
if err then
|
||||||
printError(tostring(err))
|
printError(tostring(err))
|
||||||
if stacktrace then -- alternatively log stack to _debug
|
if stacktrace then -- alternatively log stack to _debug
|
||||||
print(stacktrace)
|
print('\n' .. stacktrace)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print('\nPress enter to close')
|
print('\nPress enter to close')
|
||||||
|
|
Loading…
Reference in New Issue