File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 66
77<script lang =" ts" >
88 import { t } from ' ../i18n' ;
9- import { DeviceRequestStates } from ' ../script/microbit-interfacing/MicrobitConnection' ;
109 import Microbits from ' ../script/microbit-interfacing/Microbits' ;
1110 import { startConnectionProcess } from ' ../script/stores/connectDialogStore' ;
12- import { state } from ' ../script/stores/uiStore' ;
11+ import {
12+ compatibility ,
13+ isCompatibilityWarningDialogOpen ,
14+ state ,
15+ } from ' ../script/stores/uiStore' ;
1316 import { reconnect } from ' ../script/utils/reconnect' ;
1417 import StandardButton from ' ./StandardButton.svelte' ;
1518
1619 const handleInputConnect = async () => {
20+ if (! $compatibility .bluetooth && ! $compatibility .usb ) {
21+ return isCompatibilityWarningDialogOpen .set (true );
22+ }
1723 if ($state .showConnectHelp || Microbits .getInputMicrobit ()) {
1824 reconnect ();
1925 } else {
Original file line number Diff line number Diff line change 77<script lang =" ts" >
88 import { t } from ' ../../i18n' ;
99 import TypingUtils from ' ../../script/TypingUtils' ;
10- import { state } from ' ../../script/stores/uiStore' ;
10+ import {
11+ compatibility ,
12+ isCompatibilityWarningDialogOpen ,
13+ state ,
14+ } from ' ../../script/stores/uiStore' ;
1115 import StandardButton from ' ../StandardButton.svelte' ;
1216 import Microbits from ' ../../script/microbit-interfacing/Microbits' ;
1317 import { startConnectionProcess } from ' ../../script/stores/connectDialogStore' ;
2327 };
2428
2529 const handleInputConnect = async () => {
30+ if (! $compatibility .bluetooth && ! $compatibility .usb ) {
31+ return isCompatibilityWarningDialogOpen .set (true );
32+ }
2633 if ($state .showConnectHelp || Microbits .getInputMicrobit ()) {
2734 reconnect ();
2835 } else {
You can’t perform that action at this time.
0 commit comments