Skip to content

Commit ff83600

Browse files
authored
Refactor port handler (#3984)
* Refactor port handler and fix reconnect * Fix as per review * Don't auto-connect for virtual or manual * Fix auto-connect switch state * Move auto-connect title to the parent div The checkbox is "hidden" under the switchary library, so move to the parent to be able to show it. * Select active port when request permission port exists before * Fix retun value for webserial requestPemission
1 parent a6e3761 commit ff83600

File tree

6 files changed

+219
-377
lines changed

6 files changed

+219
-377
lines changed

src/components/port-picker/PortsInput.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@
4444
</select>
4545
</div>
4646
<div id="auto-connect-and-baud">
47-
<div id="auto-connect-switch">
47+
<div
48+
id="auto-connect-switch"
49+
:title="value.autoConnect ? $t('autoConnectEnabled') : $t('autoConnectDisabled')"
50+
>
4851
<input
4952
id="auto-connect"
5053
class="auto_connect togglesmall"
5154
type="checkbox"
52-
:value="value.autoConnect"
53-
:title="value.autoConnect ? $t('autoConnectEnabled') : $t('autoConnectDisabled')"
55+
:checked="value.autoConnect"
5456
@change="onChangeAutoConnect"
5557
>
5658
<span class="auto_connect">

0 commit comments

Comments
 (0)