Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lang/ui.ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Connecta la micro:bit a aquest ordinador amb un cable USB perquè el programa de recollida de dades es pugui descarregar.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Ordinador",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Connect the micro:bit to this computer with a USB cable so that the data collection program can be downloaded to it.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Computer",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.es-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Conecta el micro:bit a este ordenador con un cable USB para poder descargar en él el programa de recogida de datos.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Ordenador",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Connectez le micro:bit à cet ordinateur à l'aide d'un câble USB afin que le programme de collecte de données puisse y être téléchargé.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Ordinateur",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "データ収集プログラムをダウンロードできるように、micro:bitをUSBケーブルでこのコンピュータに繋げます。",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "コンピュータ",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "데이터 수집 프로그램을 micro:bit에 다운로드할 수 있도록 USB 케이블로 micro:bit를 이 컴퓨터에 연결합니다.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "컴퓨터",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.lol.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "crwdns362748:0crwdne362748:0",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "crwdns362750:0crwdne362750:0",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Sluit de micro:bit aan op deze computer met een USB-kabel zodat het programma voor gegevensverzameling kan worden gedownload.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Computer",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Połącz micro:bit z tym komputerem za pomocą kabla USB, aby program zbierania danych mógł być do niego pobrany.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Komputer",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "Conecte o micro:bit a este computador com um cabo USB para que o programa de coleta de dados possa ser baixado para ele.",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "Computador",
"description": "Label for computer icon in connection dialog"
Expand Down
4 changes: 4 additions & 0 deletions lang/ui.zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
"defaultMessage": "使用 USB 纜線將 micro:bit 連線到這台電腦,以便將數據收集程式下載到其中。",
"description": "Project download instructions"
},
"connect-cannot-see-pattern": {
"defaultMessage": "I do not see a pattern",
"description": "Link to troubleshooting not seeing Bluetooth pattern"
},
"connect-computer": {
"defaultMessage": "電腦",
"description": "Label for computer icon in connection dialog"
Expand Down
11 changes: 4 additions & 7 deletions src/components/ConnectCableDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
*
* SPDX-License-Identifier: MIT
*/
import { Button, Image, Text, VStack } from "@chakra-ui/react";
import { Image, Text, VStack } from "@chakra-ui/react";
import { FormattedMessage, useIntl } from "react-intl";
import { DataConnectionType, RadioFlowPhase } from "../data-connection-flow";
import connectCableImage from "../images/connect-cable.gif";
import ConnectContainerDialog, {
ConnectContainerDialogProps,
} from "./ConnectContainerDialog";
import DialogFooterLink from "./DialogFooterLink";

type LinkType = "switch" | "skip" | "none";
interface Config {
Expand Down Expand Up @@ -80,13 +81,9 @@ const ConnectCableDialog = ({
linkType &&
onSkip &&
onSwitch && (
<Button
onClick={linkType === "skip" ? onSkip : onSwitch}
variant="link"
size="lg"
>
<DialogFooterLink onClick={linkType === "skip" ? onSkip : onSwitch}>
<FormattedMessage id={linkTextId} />
</Button>
</DialogFooterLink>
)
}
>
Expand Down
12 changes: 12 additions & 0 deletions src/components/DialogFooterLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* (c) 2026, Micro:bit Educational Foundation and contributors
*
* SPDX-License-Identifier: MIT
*/
import { Button, ButtonProps } from "@chakra-ui/react";

const DialogFooterLink = ({ ...props }: ButtonProps) => {
return <Button variant="link" size="lg" {...props} />;
};

export default DialogFooterLink;
8 changes: 8 additions & 0 deletions src/components/EnterBluetoothPatternDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ConnectContainerDialog, {
ConnectContainerDialogProps,
} from "./ConnectContainerDialog";
import { isNativePlatform } from "../platform";
import DialogFooterLink from "./DialogFooterLink";

export interface EnterBluetoothPatternDialogProps
extends Omit<ConnectContainerDialogProps, "children" | "headingId"> {
Expand Down Expand Up @@ -60,6 +61,13 @@ const EnterBluetoothPatternDialog = ({
onNextClick={handleNextClick}
onBackClick={handleBackClick}
headingId={headingId}
footerLeft={
isNativePlatform() ? (
<DialogFooterLink onClick={handleBackClick}>
<FormattedMessage id="connect-cannot-see-pattern" />
</DialogFooterLink>
) : undefined
}
{...props}
>
<VStack gap={10}>
Expand Down
14 changes: 5 additions & 9 deletions src/components/ResetToBluetoothModeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
*
* SPDX-License-Identifier: MIT
*/
import { AspectRatio, Image, Link, Text, VStack } from "@chakra-ui/react";
import { AspectRatio, Image, Text, VStack } from "@chakra-ui/react";
import { useCallback, useState } from "react";
import { FormattedMessage } from "react-intl";
import { BluetoothPairingMethod } from "../data-connection-flow/data-connection-types";
import abReset from "../images/bluetooth-mode-a+b+reset.gif";
import tripleReset from "../images/bluetooth-mode-triple-reset.gif";
import ConnectContainerDialog, {
ConnectContainerDialogProps,
} from "./ConnectContainerDialog";
import { useCallback, useState } from "react";
import DialogFooterLink from "./DialogFooterLink";

export interface ResetToBluetoothModeDialogProps
extends Omit<ConnectContainerDialogProps, "children" | "headingId"> {
Expand Down Expand Up @@ -40,20 +41,15 @@ const ResetToBluetoothModeDialog = ({
key={pairingMethod}
headingId="reset-to-bluetooth-mode-heading"
footerLeft={
<Link
as="button"
color="brand.600"
<DialogFooterLink
onClick={isTripleReset ? onSwitchPairingMethod : onTroubleshooting}
display="flex"
flexDirection="row"
gap={1}
>
{isTripleReset ? (
<FormattedMessage id="connect-try-another-way" />
) : (
<FormattedMessage id="connect-unable-to-enter-bluetooth-mode" />
)}
</Link>
</DialogFooterLink>
}
>
<VStack gap={5} width="100%">
Expand Down
7 changes: 4 additions & 3 deletions src/components/WhatYouWillNeedDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: MIT
*/
import { Button, Grid, GridItem, Image, Text, VStack } from "@chakra-ui/react";
import { Grid, GridItem, Image, Text, VStack } from "@chakra-ui/react";
import { FormattedMessage } from "react-intl";
import batteryPackImage from "../images/stylised-battery-pack.svg";
import microbitImage from "../images/stylised-microbit-black.svg";
Expand All @@ -16,6 +16,7 @@ import ConnectContainerDialog, {
} from "./ConnectContainerDialog";
import ExternalLink from "./ExternalLink";
import { useDeployment } from "../deployment";
import DialogFooterLink from "./DialogFooterLink";

const itemsConfig = {
radio: [
Expand Down Expand Up @@ -89,13 +90,13 @@ const WhatYouWillNeedDialog = ({
footerLeft={
<VStack alignItems="start">
{onLinkClick && (
<Button onClick={onLinkClick} variant="link" size="lg">
<DialogFooterLink onClick={onLinkClick}>
<FormattedMessage
id={`connect-${type}-start-switch-${
type === "bluetooth" ? "radio" : "bluetooth"
}`}
/>
</Button>
</DialogFooterLink>
)}
{reconnect && (
<ExternalLink
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,12 @@
"value": "Connecta la micro:bit a aquest ordinador amb un cable USB perquè el programa de recollida de dades es pugui descarregar."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@
"value": "Connect the micro:bit to this computer with a USB cable so that the data collection program can be downloaded to it."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.es-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@
"value": "Conecta el micro:bit a este ordenador con un cable USB para poder descargar en él el programa de recogida de datos."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@
"value": "Connectez le micro:bit à cet ordinateur à l'aide d'un câble USB afin que le programme de collecte de données puisse y être téléchargé."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@
"value": "データ収集プログラムをダウンロードできるように、micro:bitをUSBケーブルでこのコンピュータに繋げます。"
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,12 @@
"value": "데이터 수집 프로그램을 micro:bit에 다운로드할 수 있도록 USB 케이블로 micro:bit를 이 컴퓨터에 연결합니다."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.lol.json
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@
"value": "crwdns362748:0crwdne362748:0"
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@
"value": "Sluit de micro:bit aan op deze computer met een USB-kabel zodat het programma voor gegevensverzameling kan worden gedownload."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@
"value": "Połącz micro:bit z tym komputerem za pomocą kabla USB, aby program zbierania danych mógł być do niego pobrany."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
6 changes: 6 additions & 0 deletions src/messages/ui.pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@
"value": "Conecte o micro:bit a este computador com um cabo USB para que o programa de coleta de dados possa ser baixado para ele."
}
],
"connect-cannot-see-pattern": [
{
"type": 0,
"value": "I do not see a pattern"
}
],
"connect-computer": [
{
"type": 0,
Expand Down
Loading
Loading