Skip to content

Commit

Permalink
Refactor port handler (#3984)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
McGiverGim authored May 30, 2024
1 parent a6e3761 commit ff83600
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 377 deletions.
8 changes: 5 additions & 3 deletions src/components/port-picker/PortsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@
</select>
</div>
<div id="auto-connect-and-baud">
<div id="auto-connect-switch">
<div
id="auto-connect-switch"
:title="value.autoConnect ? $t('autoConnectEnabled') : $t('autoConnectDisabled')"
>
<input
id="auto-connect"
class="auto_connect togglesmall"
type="checkbox"
:value="value.autoConnect"
:title="value.autoConnect ? $t('autoConnectEnabled') : $t('autoConnectDisabled')"
:checked="value.autoConnect"
@change="onChangeAutoConnect"
>
<span class="auto_connect">
Expand Down
Loading

0 comments on commit ff83600

Please sign in to comment.