milo config backups
This commit is contained in:
@@ -4,6 +4,7 @@ local Milo = require('milo')
|
|||||||
local UI = require('ui')
|
local UI = require('ui')
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -30,7 +31,8 @@ local wizardPage = UI.WizardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wizardPage:isValidType(node)
|
function wizardPage:isValidType(node)
|
||||||
return node.adapter and node.adapter.type == 'drive' and {
|
local m = device[node.name]
|
||||||
|
return m and m.type == 'drive' and {
|
||||||
name = 'Backup Drive',
|
name = 'Backup Drive',
|
||||||
value = 'backup',
|
value = 'backup',
|
||||||
category = 'custom',
|
category = 'custom',
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ local Milo = require('milo')
|
|||||||
local Sound = require('sound')
|
local Sound = require('sound')
|
||||||
local UI = require('ui')
|
local UI = require('ui')
|
||||||
|
|
||||||
local colors = _G.colors
|
local colors = _G.colors
|
||||||
local context = Milo:getContext()
|
local device = _G.device
|
||||||
local peripheral = _G.peripheral
|
local context = Milo:getContext()
|
||||||
|
|
||||||
local speakerNode = context.storage:getSingleNode('speaker')
|
local speakerNode = context.storage:getSingleNode('speaker')
|
||||||
if speakerNode then
|
if speakerNode then
|
||||||
@@ -50,7 +50,8 @@ function wizardPage:validate()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function wizardPage:isValidType(node)
|
function wizardPage:isValidType(node)
|
||||||
return node.adapter and node.adapter.type == 'speaker' and {
|
local m = device[node.name]
|
||||||
|
return m and m.type == 'speaker' and {
|
||||||
name = 'Speaker',
|
name = 'Speaker',
|
||||||
value = 'speaker',
|
value = 'speaker',
|
||||||
category = 'custom',
|
category = 'custom',
|
||||||
|
|||||||
Reference in New Issue
Block a user