-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep the hub name as a default when installing/re-installing PyBricks Firmware #2297
base: master
Are you sure you want to change the base?
Changes from 2 commits
6a74a6a
06d4467
150b096
77032c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) 2022-2023 The Pybricks Authors | ||
// Copyright (c) 2022-2024 The Pybricks Authors | ||
|
||
import './installPybricksDialog.scss'; | ||
import { | ||
|
@@ -450,6 +450,7 @@ const BootloaderModePanel: React.FunctionComponent<BootloaderModePanelProps> = ( | |
|
||
export const InstallPybricksDialog: React.FunctionComponent = () => { | ||
const { isOpen } = useSelector((s) => s.firmware.installPybricksDialog); | ||
const deviceNameLastConnected = useSelector((s) => s.ble.deviceNameLastConnected); | ||
const inProgress = useSelector( | ||
(s) => | ||
s.firmware.isFirmwareFlashUsbDfuInProgress || | ||
|
@@ -527,7 +528,7 @@ export const InstallPybricksDialog: React.FunctionComponent = () => { | |
title={i18n.translate('optionsPanel.title')} | ||
panel={ | ||
<ConfigureOptionsPanel | ||
hubName={hubName} | ||
hubName={hubName || deviceNameLastConnected} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't look like it would work correctly. It would only display Instead, I would use |
||
metadata={ | ||
isCustomFirmwareRequested | ||
? customFirmwareData?.metadata | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need a state for this, just a hook that wraps
useLocalStorage()
.