diff --git a/locales/en/messages.json b/locales/en/messages.json index 5f263e09..faac0797 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -109,6 +109,10 @@ "message": "Show all serial devices (for manufacturers or development)", "description": "Do not filter serial devices using VID/PID values (for manufacturers or development)" }, + "showVirtualMode": { + "message": "Enable virtual connection mode", + "description": "Text for the option to enable or disable the virtual FC" + }, "cordovaForceComputerUI": { "message": "Use computers interface instead of phones interface" }, diff --git a/src/js/port_handler.js b/src/js/port_handler.js index 2b534420..ee01a1f5 100644 --- a/src/js/port_handler.js +++ b/src/js/port_handler.js @@ -13,6 +13,8 @@ const PortHandler = new function () { this.port_removed_callbacks = []; this.dfu_available = false; this.port_available = false; + this.showAllSerialDevices = false; + this.showVirtualMode = false; }; PortHandler.initialize = function () { @@ -31,6 +33,9 @@ PortHandler.initialize = function () { PortHandler.check = function () { const self = this; + ConfigStorage.get('showVirtualMode', res => self.showVirtualMode = res.showVirtualMode); + ConfigStorage.get('showAllSerialDevices', res => self.showAllSerialDevices = res.showAllSerialDevices); + self.check_usb_devices(); self.check_serial_devices(); @@ -79,17 +84,20 @@ PortHandler.check_usb_devices = function (callback) { data: {isDFU: true}, })); - self.portPickerElement.append($('