mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
firmware/alerts: Show correct instructions for Linux.
Also link to pybricks website for udev rules instead.
This commit is contained in:
committed by
David Lechner
parent
b6575c5724
commit
a7a0f5221b
@@ -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';
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user