From 21a3390fa192c0351827cc77e78e726564e89c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=ADguel=20=C3=81ngel=20Mulero=20Mart=C3=ADnez?= Date: Sat, 18 May 2024 02:21:30 +0200 Subject: [PATCH] Fix lint issues (#3972) --- .../port-picker/FirmwareVirtualOption.vue | 37 +++--- .../port-picker/PortOverrideOption.vue | 15 +-- src/components/port-picker/PortPicker.vue | 67 ++++++---- src/components/port-picker/PortsInput.vue | 119 +++++++++--------- src/js/port_handler.js | 2 +- src/js/webSerial.js | 8 +- 6 files changed, 131 insertions(+), 117 deletions(-) diff --git a/src/components/port-picker/FirmwareVirtualOption.vue b/src/components/port-picker/FirmwareVirtualOption.vue index 1a943f2327..d3663f5068 100644 --- a/src/components/port-picker/FirmwareVirtualOption.vue +++ b/src/components/port-picker/FirmwareVirtualOption.vue @@ -5,9 +5,10 @@ diff --git a/src/components/port-picker/PortPicker.vue b/src/components/port-picker/PortPicker.vue index 317f79a6c5..74f6ae8806 100644 --- a/src/components/port-picker/PortPicker.vue +++ b/src/components/port-picker/PortPicker.vue @@ -1,17 +1,21 @@ @@ -21,30 +25,39 @@ import FirmwareVirtualOption from "./FirmwareVirtualOption.vue"; import PortsInput from "./PortsInput.vue"; export default { - props: { - value: { - type: Object, - default: { - selectedPort: "manual", - selectedBaud: 115200, - portOverride: "/dev/rfcomm0", - virtualMspVersion: "1.46.0", - }, - }, - connectedDevices: { - type: Array, - default: () => [], - }, - disabled: { - type: Boolean, - default: false, - }, - }, components: { PortOverrideOption, FirmwareVirtualOption, PortsInput, }, + props: { + value: { + type: Object, + default: () => ({ + selectedPort: "manual", + selectedBaud: 115200, + portOverride: "/dev/rfcomm0", + virtualMspVersion: "1.46.0", + }), + }, + connectedDevices: { + type: Array, + default: () => [], + }, + disabled: { + type: Boolean, + default: false, + }, + }, + methods: { + updateValue(key, value) { + if (key != null) { + this.$emit("input", { ...this.value, [key]: value }); + } else { + this.$emit("input", { ...this.value, ...value}); + } + }, + }, }; diff --git a/src/components/port-picker/PortsInput.vue b/src/components/port-picker/PortsInput.vue index c9ac85d1be..a0deb0f52f 100644 --- a/src/components/port-picker/PortsInput.vue +++ b/src/components/port-picker/PortsInput.vue @@ -6,11 +6,12 @@
-