Skip to content

Commit 7c71005

Browse files
authored
feat: Migrate Ports Tab to Vue (#4726)
* feat: Migrate Ports tab to Vue - Create PortsTab.vue component - Register PortsTab in Vue components - Update main.js to use Vue mounter for 'ports' tab - Delete legacy ports.js and ports.html * fix(PortsTab): Fix checkbox styling initialization by using nextTick * fix(PortsTab): Improve accessibility of documentation link * fix(PortsTab): Enforce brace style for if statements * fix(PortsTab): Enforce mutual exclusivity and brace style in event handlers * chore: Address SonarQube issues (nesting, braces, globals) * refactor: extract feature detection into a helper function and add visually hidden labels for accessibility. * style(PortsTab): Fix save button positioning by using position:fixed * style: format `if` statements in `PortsTab.vue` for improved readability. * chore: fix duplication in PortsTab.vue * refactor: remove Capacitor serial protocol implementation. * Revert "refactor: remove Capacitor serial protocol implementation." This reverts commit 0cceae8. * refactor: remove redundant `pluginAvailable` checks from serial methods
1 parent 87423fc commit 7c71005

File tree

7 files changed

+559
-602
lines changed

7 files changed

+559
-602
lines changed

src/components/tabs/PortsTab.vue

Lines changed: 546 additions & 0 deletions
Large diffs are not rendered by default.

src/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function startProcess() {
264264
import("./tabs/adjustments").then(({ adjustments }) => adjustments.initialize(content_ready));
265265
break;
266266
case "ports":
267-
import("./tabs/ports").then(({ ports }) => ports.initialize(content_ready));
267+
mountVueTab("ports", content_ready);
268268
break;
269269
case "led_strip":
270270
import("./tabs/led_strip").then(({ led_strip }) => led_strip.initialize(content_ready));

src/js/protocols/CapacitorSerial.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class CapacitorSerial extends EventTarget {
137137

138138
async requestPermissionDevice() {
139139
let newPermissionPort = null;
140+
140141
try {
141142
console.log(`${logHead} Requesting USB permissions...`);
142143
const userSelectedPort = await BetaflightSerial.requestPermission();

0 commit comments

Comments
 (0)