mirror of
				https://github.com/kepler155c/opus
				synced 2025-10-26 05:07:40 +00:00 
			
		
		
		
	pcall driver init
This commit is contained in:
		| @@ -43,14 +43,14 @@ local page = UI.Page { | |||||||
| 				{ text = 'Establish', event = 'trust'   }, | 				{ text = 'Establish', event = 'trust'   }, | ||||||
| 				{ text = 'Remove',    event = 'untrust' }, | 				{ text = 'Remove',    event = 'untrust' }, | ||||||
| 			} }, | 			} }, | ||||||
| 			{ text = 'Help', event = 'help' }, | 			{ text = 'Help', event = 'help', noCheck = true }, | ||||||
| 			{ | 			{ | ||||||
| 				text = '\206', | 				text = '\206', | ||||||
| 				x = -3, | 				x = -3, | ||||||
| 				dropdown = { | 				dropdown = { | ||||||
| 					{ text = 'Show all', event = 'show_all' }, | 					{ text = 'Show all', event = 'show_all', noCheck = true }, | ||||||
| 					UI.MenuBar.spacer, | 					UI.MenuBar.spacer, | ||||||
| 					{ text = 'Show trusted', event = 'show_trusted' }, | 					{ text = 'Show trusted', event = 'show_trusted', noCheck = true }, | ||||||
| 				}, | 				}, | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -159,6 +159,7 @@ This only needs to be done once. | |||||||
|  |  | ||||||
| 	elseif event.type == 'show_all' then | 	elseif event.type == 'show_all' then | ||||||
| 		config.showTrusted = false | 		config.showTrusted = false | ||||||
|  | 		self.grid:setValues(network) | ||||||
| 		Config.update('network', config) | 		Config.update('network', config) | ||||||
|  |  | ||||||
| 	elseif event.type == 'show_trusted' then | 	elseif event.type == 'show_trusted' then | ||||||
| @@ -177,7 +178,7 @@ function page.menuBar:getActive(menuItem) | |||||||
| 		local trustList = Util.readTable('usr/.known_hosts') or { } | 		local trustList = Util.readTable('usr/.known_hosts') or { } | ||||||
| 		return t and trustList[t.id] | 		return t and trustList[t.id] | ||||||
| 	end | 	end | ||||||
| 	return not not t | 	return menuItem.noCheck or not not t | ||||||
| end | end | ||||||
|  |  | ||||||
| function page.grid:getRowTextColor(row, selected) | function page.grid:getRowTextColor(row, selected) | ||||||
|   | |||||||
| @@ -173,6 +173,9 @@ end | |||||||
| -- initialize drivers | -- initialize drivers | ||||||
| for _,v in pairs(device) do | for _,v in pairs(device) do | ||||||
| 	if drivers[v.type] then | 	if drivers[v.type] then | ||||||
| 		drivers[v.type](v) | 		local s, m = pcall(drivers[v.type], v) | ||||||
|  | 		if not s and m then | ||||||
|  | 			_G.printError(m) | ||||||
|  | 		end | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 kepler155c@gmail.com
					kepler155c@gmail.com