File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * (c) 2025, Micro:bit Educational Foundation and contributors
3+ *
4+ * SPDX-License-Identifier: MIT
5+ */
6+ import { Box } from "@chakra-ui/react" ;
7+ import { useIntl } from "react-intl" ;
8+
9+ const ChooseDeviceOverlay = ( ) => {
10+ const intl = useIntl ( ) ;
11+ return (
12+ < Box
13+ // We don't really expect it to be possible to interact with this overlay
14+ // as it is only shown when the native browser requestDeviceDialog is
15+ // open. But still useful for code trying to identify open dialogs.
16+ role = "dialog"
17+ aria-label = { intl . formatMessage ( { id : "connect-popup-instruction1" } ) }
18+ width = "100vw"
19+ height = "100vh"
20+ background = "blackAlpha.600"
21+ position = "fixed"
22+ top = { 0 }
23+ left = { 0 }
24+ zIndex = "overlay"
25+ />
26+ ) ;
27+ } ;
28+
29+ export default ChooseDeviceOverlay ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import TryAgainDialog from "./TryAgainDialog";
3232import UnsupportedMicrobitDialog from "./UnsupportedMicrobitDialog" ;
3333import WebUsbBluetoothUnsupportedDialog from "./WebUsbBluetoothUnsupportedDialog" ;
3434import WhatYouWillNeedDialog from "./WhatYouWillNeedDialog" ;
35+ import ChooseDeviceOverlay from "./ChooseDeviceOverlay" ;
3536
3637const ConnectionDialogs = ( ) => {
3738 const { stage, actions } = useConnectionStage ( ) ;
@@ -174,7 +175,7 @@ const ConnectionDialogs = () => {
174175 }
175176 case ConnectionFlowStep . WebUsbChooseMicrobit : {
176177 // Browser dialog is shown, no custom dialog shown at the same time
177- return < > < /> ;
178+ return < ChooseDeviceOverlay /> ;
178179 }
179180 case ConnectionFlowStep . FlashingInProgress : {
180181 return (
You can’t perform that action at this time.
0 commit comments