mirror of
https://github.com/kepler155c/opus
synced 2025-01-01 03:10:28 +00:00
Merge branch 'develop-1.8' of https://github.com/kepler155c/opus into develop-1.8
This commit is contained in:
commit
ad447f36b5
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2016-2017 kepler155c
|
Copyright (c) 2016-2019 kepler155c
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -15,5 +15,4 @@
|
|||||||
## Install
|
## Install
|
||||||
```
|
```
|
||||||
pastebin run uzghlbnc
|
pastebin run uzghlbnc
|
||||||
reboot
|
|
||||||
```
|
```
|
||||||
|
@ -3,6 +3,7 @@ local parentShell = _ENV.shell
|
|||||||
_ENV.shell = { }
|
_ENV.shell = { }
|
||||||
|
|
||||||
local fs = _G.fs
|
local fs = _G.fs
|
||||||
|
local settings = _G.settings
|
||||||
local shell = _ENV.shell
|
local shell = _ENV.shell
|
||||||
|
|
||||||
local sandboxEnv = setmetatable({ }, { __index = _G })
|
local sandboxEnv = setmetatable({ }, { __index = _G })
|
||||||
@ -673,6 +674,10 @@ local history = History.load('usr/.shell_history', 25)
|
|||||||
term.setBackgroundColor(_colors.backgroundColor)
|
term.setBackgroundColor(_colors.backgroundColor)
|
||||||
term.clear()
|
term.clear()
|
||||||
|
|
||||||
|
if settings.get("motd.enabled") then
|
||||||
|
shell.run("motd")
|
||||||
|
end
|
||||||
|
|
||||||
while not bExit do
|
while not bExit do
|
||||||
if config.displayDirectory then
|
if config.displayDirectory then
|
||||||
term.setTextColour(_colors.directoryTextColor)
|
term.setTextColour(_colors.directoryTextColor)
|
||||||
|
@ -100,6 +100,7 @@ function UI.Form:validateField(field)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if field.validate == 'numeric' then
|
if field.validate == 'numeric' then
|
||||||
|
field.value = field.value or ''
|
||||||
if #tostring(field.value) > 0 then
|
if #tostring(field.value) > 0 then
|
||||||
if not tonumber(field.value) then
|
if not tonumber(field.value) then
|
||||||
return false, 'Invalid number'
|
return false, 'Invalid number'
|
||||||
|
Loading…
Reference in New Issue
Block a user