diff --git a/app-shell/src/system-info/index.ts b/app-shell/src/system-info/index.ts index cc49eafb6e1..73fff4de6cb 100644 --- a/app-shell/src/system-info/index.ts +++ b/app-shell/src/system-info/index.ts @@ -31,8 +31,8 @@ const createUsbDevice = (device: USBDevice): UsbDevice => { return { vendorId: device.vendorId, productId: device.productId, - deviceName: device.productName != null ? device.productName : 'no name', - manufacturer: + productName: device.productName != null ? device.productName : 'no name', + manufacturerName: device.manufacturerName != null ? device.manufacturerName : 'no manufacture', @@ -46,8 +46,8 @@ const createUsbDevices = (devices: USBDevice[]): UsbDevice[] => const addDriverVersion = (device: UsbDevice): Promise => { if ( isWindows() && - device.manufacturer != null && - RE_REALTEK.test(device.manufacturer) + device.manufacturerName != null && + RE_REALTEK.test(device.manufacturerName) ) { return getWindowsDriverVersion(device).then(windowsDriverVersion => ({ ...device, diff --git a/app-shell/src/system-info/usb-devices.ts b/app-shell/src/system-info/usb-devices.ts index ab2364bec85..c9b26dc2dfa 100644 --- a/app-shell/src/system-info/usb-devices.ts +++ b/app-shell/src/system-info/usb-devices.ts @@ -1,6 +1,6 @@ import assert from 'assert' import execa from 'execa' -import { usb, webusb } from 'usb' +import { usb, WebUSB } from 'usb' import { isWindows } from '../os' import { createLogger } from '../log' @@ -17,6 +17,9 @@ export interface UsbDeviceMonitor { } const log = createLogger('usb-devices') +const webusb = new WebUSB({ + allowAllDevices: true, +}) export function createUsbDeviceMonitor( options: UsbDeviceMonitorOptions = {} diff --git a/app/src/pages/AppSettings/AdvancedSettings.tsx b/app/src/pages/AppSettings/AdvancedSettings.tsx index 85346b1572b..8dff527c9e5 100644 --- a/app/src/pages/AppSettings/AdvancedSettings.tsx +++ b/app/src/pages/AppSettings/AdvancedSettings.tsx @@ -593,7 +593,11 @@ export function AdvancedSettings(): JSX.Element { {t('usb_to_ethernet_adapter_description')} - {device?.deviceName} + + {device?.productName != null + ? device?.productName + : t('shared:no_data')} + {t('usb_to_ethernet_adapter_manufacturer')} - {device?.manufacturer} + + {device?.manufacturerName != null + ? device?.manufacturerName + : t('shared:no_data')} +