Skip to content

Commit 6a1c65a

Browse files
committed
frontend: show enable bluetooth message in a status component
Showing a warning looks nicer than plain text.
1 parent 6d7592e commit 6a1c65a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

frontends/web/src/components/bluetooth/bluetooth.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { useTranslation } from 'react-i18next';
1818
import { useSync } from '@/hooks/api';
1919
import { connect, getState, syncState } from '@/api/bluetooth';
2020
import { runningInIOS } from '@/utils/env';
21+
import { Status } from '@/components/status/status';
2122
import { ActionableItem } from '@/components/actionable-item/actionable-item';
2223
import { Badge } from '@/components/badge/badge';
2324
import styles from './bluetooth.module.css';
@@ -29,7 +30,11 @@ const _Bluetooth = () => {
2930
return null;
3031
}
3132
if (!state.bluetoothAvailable) {
32-
return <>Please turn on Bluetooth</>;
33+
return (
34+
<Status type="warning">
35+
{t('bluetooth.enable')}
36+
</Status>
37+
);
3338
}
3439
return (
3540
<>

frontends/web/src/locales/en/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@
368368
},
369369
"bluetooth": {
370370
"connectionFailed": "failed",
371+
"enable": "Please turn on Bluetooth",
371372
"select": "Select your BitBox"
372373
},
373374
"bootloader": {

0 commit comments

Comments
 (0)