firmware/alerts: Show correct instructions for Linux.

Also link to pybricks website for udev rules instead.
This commit is contained in:
Laurens Valk
2022-12-20 12:09:04 -06:00
committed by David Lechner
parent b6575c5724
commit a7a0f5221b
3 changed files with 17 additions and 3 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ export const pybricksUsbDfuTroubleshootingUrl =
'https://github.com/pybricks/support/discussions/688';
export const pybricksUsbLinuxUdevRulesUrl =
'https://github.com/pybricks/support/discussions/688#discussioncomment-3239099';
'https://pybricks.com/projects/tutorials/dev/tools/linux/';
/** Pybricks copyright statement. */
export const pybricksCopyright = 'Copyright (c) 2020-2023 The Pybricks Authors';
+14 -1
View File
@@ -3,7 +3,10 @@
import { AnchorButton, Button, Intent } from '@blueprintjs/core';
import React from 'react';
import { pybricksUsbDfuTroubleshootingUrl } from '../../app/constants';
import {
pybricksUsbDfuTroubleshootingUrl,
pybricksUsbLinuxUdevRulesUrl,
} from '../../app/constants';
import ExternalLinkIcon from '../../components/ExternalLinkIcon';
import type { CreateToast } from '../../toasterTypes';
import { isLinux, isWindows } from '../../utils/os';
@@ -30,6 +33,16 @@ const NoDfuHub: React.VoidFunctionComponent<NoDfuHubProps> = ({
{i18n.translate('noDfuHub.installUsbDriverButton')}
</Button>
)}
{isLinux() && (
<AnchorButton
icon="help"
href={pybricksUsbLinuxUdevRulesUrl}
target="_blank"
>
{i18n.translate('noDfuHub.configureUdevRulesButton')}
<ExternalLinkIcon />
</AnchorButton>
)}
<AnchorButton
icon="help"
href={pybricksUsbDfuTroubleshootingUrl}
+2 -1
View File
@@ -15,7 +15,8 @@
"linux": "You may need to add udev rules before you can connect to your hub."
},
"troubleshootButton": "Troubleshooting Tips",
"installUsbDriverButton": "Install USB Driver"
"installUsbDriverButton": "Install USB Driver",
"configureUdevRulesButton": "Configure udev rules"
},
"noDfuInterface": {
"message": "This is very unusual. The USB device did not contain the expected interface."