mirror of
https://github.com/kepler155c/opus
synced 2025-01-07 06:10:27 +00:00
cleanup
This commit is contained in:
parent
ea8e981880
commit
235e8d11de
@ -11,6 +11,7 @@ local UI = require('ui')
|
|||||||
local Util = require('util')
|
local Util = require('util')
|
||||||
|
|
||||||
local colors = _G.colors
|
local colors = _G.colors
|
||||||
|
local device = _G.device
|
||||||
local fs = _G.fs
|
local fs = _G.fs
|
||||||
local os = _G.os
|
local os = _G.os
|
||||||
local pocket = _G.pocket
|
local pocket = _G.pocket
|
||||||
@ -168,9 +169,10 @@ local function loadApplications()
|
|||||||
pocket = not not pocket,
|
pocket = not not pocket,
|
||||||
advancedPocket = pocket and term.isColor(),
|
advancedPocket = pocket and term.isColor(),
|
||||||
advancedComputer = not turtle and not pocket and term.isColor(),
|
advancedComputer = not turtle and not pocket and term.isColor(),
|
||||||
|
neuralInterface = not not device.neuralInterface,
|
||||||
}
|
}
|
||||||
|
|
||||||
applications = Util.readTable('sys/etc/app.db')
|
applications = Util.readTable('sys/etc/apps.db')
|
||||||
|
|
||||||
for dir in pairs(Packages:installed()) do
|
for dir in pairs(Packages:installed()) do
|
||||||
local path = fs.combine('packages/' .. dir, 'etc/apps.db')
|
local path = fs.combine('packages/' .. dir, 'etc/apps.db')
|
||||||
|
@ -4,9 +4,10 @@ local UI = require('ui')
|
|||||||
|
|
||||||
local colors = _G.colors
|
local colors = _G.colors
|
||||||
|
|
||||||
local config = Config.load('cloud')
|
if _G.http.websocket then
|
||||||
|
local config = Config.load('cloud')
|
||||||
|
|
||||||
local tab = UI.Tab {
|
local tab = UI.Tab {
|
||||||
tabTitle = 'Cloud',
|
tabTitle = 'Cloud',
|
||||||
description = 'Cloud catcher options',
|
description = 'Cloud catcher options',
|
||||||
key = UI.TextEntry {
|
key = UI.TextEntry {
|
||||||
@ -28,16 +29,16 @@ local tab = UI.Tab {
|
|||||||
textColor = colors.yellow,
|
textColor = colors.yellow,
|
||||||
marginRight = 0,
|
marginRight = 0,
|
||||||
value = string.format(
|
value = string.format(
|
||||||
[[Use a non-changing cloud key. Note that only a single computer can use this session at one time.
|
[[Use a non-changing cloud key. Note that only a single computer can use this session at one time.
|
||||||
To obtain a key, visit:
|
To obtain a key, visit:
|
||||||
%shttps://cloud-catcher.squiddev.cc%s then bookmark:
|
%shttps://cloud-catcher.squiddev.cc%s then bookmark:
|
||||||
%shttps://cloud-catcher.squiddev.cc/?id=%sKEY
|
%shttps://cloud-catcher.squiddev.cc/?id=%sKEY
|
||||||
]],
|
]],
|
||||||
Ansi.orange, Ansi.reset, Ansi.orange, Ansi.black),
|
Ansi.white, Ansi.reset, Ansi.white, Ansi.white),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function tab:eventHandler(event)
|
function tab:eventHandler(event)
|
||||||
if event.type == 'update_key' then
|
if event.type == 'update_key' then
|
||||||
if #self.key.value > 0 then
|
if #self.key.value > 0 then
|
||||||
config.key = self.key.value
|
config.key = self.key.value
|
||||||
@ -47,7 +48,8 @@ function tab:eventHandler(event)
|
|||||||
Config.update('cloud', config)
|
Config.update('cloud', config)
|
||||||
self:emit({ type = 'success_message', message = 'Updated' })
|
self:emit({ type = 'success_message', message = 'Updated' })
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return tab
|
||||||
end
|
end
|
||||||
|
|
||||||
return tab
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if fs.exists('sys/apps/shell') and fs.exists('sys/apps/shell.lua') then
|
if fs.exists('sys/apps/shell') and fs.exists('sys/apps/shell.lua') then
|
||||||
fs.delete('sys/apps/shell')
|
fs.delete('sys/apps/shell')
|
||||||
end
|
end
|
||||||
if fs.exists('sys/autorun/gps.lua') then fs.delete('sys/autorun/gps.lua') end
|
if fs.exists('sys/etc/app.db') then fs.delete('sys/etc/app.db') end
|
Loading…
Reference in New Issue
Block a user