David Lechner
bad7f1b066
app/constants: add zip file extension and mime type
2023-03-07 14:31:12 -06:00
David Lechner
ac00b82cab
firmware/installPybricksDialog: fix hub name error icon style
2023-02-16 14:10:07 -06:00
David Lechner
63597e4b88
firmware/installPybricksDialog: only call useFirmware() once
...
We were unpacking the firmware twice. Instead, we should only call
useFirmware() once and pass the results as props.
2023-02-16 14:10:07 -06:00
David Lechner
a841562c6c
firmware/installPybricksDialog: remove hard-coded hub name size check
...
The UI has been rearranged so we now have firmware metadata available
when we validate the hub name.
2023-02-16 14:10:07 -06:00
David Lechner
c8bcddbffd
firmware/installPybricksDialog: fix use of useCustomFirmware()
...
useCustomFirmware() was called multiple times with the same file which
resulted in the same file being parsed 3 times. Instead we should only
call useCustomFirmware() and pass the results as props instead.
2023-02-16 14:10:07 -06:00
David Lechner
25231012f6
firmware: consolidate back/next button props
...
This reduces duplicate code and fixes "Back" not being translated on
the last step.
2022-12-20 12:28:06 -06:00
David Lechner
9d71bb4734
eslint: enable react-hooks checks
...
Also fix all errors, which can lead to subtile bugs.
Mostly fixings deps and refactoring to make typescript happy.
2022-12-17 13:56:01 -06:00
David Lechner
b85945ab1d
installPybricksDialog: fix heart icon
...
Use actual icon instead of unicode character. This way it renders the
same on all OSes.
2022-12-16 17:54:36 -06:00
Laurens Valk
9ceaeee739
firmware/installPybricksDialog: Make heart icon variable.
2022-12-15 14:59:36 -06:00
Laurens Valk
d303e28756
firmware/bootloaderInstructions: Edit unsupported hubs.
2022-12-15 14:59:36 -06:00
Laurens Valk
8aa82eee46
firmware/bootloaderInstructions: Refactor.
...
- Use steps for the connection procedure
- Use categories (To do: consider making numbering consecutive)
- Show hub bootloader device name explicitly
- List official app to use for recovery (make V2/V3 explicit)
- Copy edit
Also fix the layout (class) of the installation panel to make it consistent with the style of the recovery panel.
2022-12-15 14:59:36 -06:00
David Lechner
44169bd178
firmware/bootloaderInstructions: extract component
...
This extracts the instructions for placing a hub in bootloader mode to
a separate component so that it can be shared.
2022-11-18 19:28:00 -06:00
David Lechner
56630ef2cf
firmware/installPybricksDialog: drop support for including custom main.py
...
This removes the UI and internal support for selecting a file to include
as the main.py when flashing firmware. This feature was removed in the
firmware starting with firmware metadata v2.0.0 so the firmware that
ships with Pybricks code won't be able to do this in the near future.
So, it doesn't make sense to keep this feature only for old firmware.
It is still possible to replace the main.py in old firmware.zip files
and flash that way.
2022-09-14 18:12:34 -05:00
David Lechner
4e77efb34f
installPybricksDialog: add feature to install custom firmware
...
This restores the ability to drag and drop a custom firmware file to
flash the firmware on the hub.
Fixes: https://github.com/pybricks/pybricks-code/issues/1020
2022-09-06 14:14:57 -05:00
David Lechner
677d285ef2
installPybricksDialog: move unsupported hubs to separate component
2022-09-03 14:06:25 -05:00
David Lechner
b4e1c8293d
replace use of deprecated IRef
2022-09-01 11:45:59 -05:00
David Lechner
c84afea181
style: make use of more blueprint styles
...
https://blueprintjs.com/docs/#core/typography
Also fix wrapping license text while we are touching this.
2022-07-27 16:55:46 -05:00
David Lechner
e6609b9054
firmware/installPybricksDialog: fix <div> inside <p>
...
fixes:
Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
Also some other style tweaks while we are touching this.
2022-07-27 16:22:46 -05:00
David Lechner
3953816350
components/hubPicker: back state with localStorage
...
This saves the selected hub in localStorage. This will "remember" the
state between app launches and also synchronize the state between
various users of the component. Both of these should mean fewer clicks
required by the user.
2022-07-27 15:30:39 -05:00
David Lechner
76444c032c
firmware/installPybricksDialog: add warning for windows/linux usb
...
This warns the user before failure. Otherwise they will click the flash
button and no devices will appear in the scan dialog.
2022-07-27 15:19:36 -05:00
David Lechner
d6df128860
i18n: use automatic type inference of translation keys
...
Finally figured out a way to make typescript strongly type translation
keys so we can avoid the tedium of creating enums of translation keys.
2022-07-22 13:48:50 -05:00
David Lechner
bb6f86ff18
firmware/installPybricksDialog: add bootloader discrimination
...
Also fix license not showing for newer hubs.
2022-07-20 18:51:45 -05:00
David Lechner
0721a24ef8
firmware/installPybricksDialog: fix some layout issues
2022-07-20 15:24:36 -05:00
David Lechner
af8a31d50c
firmware: add select picker for selecting custom main.py
2022-07-20 14:25:40 -05:00
David Lechner
85deb42f76
firmware: add multi-step dialog
2022-07-20 12:32:17 -05:00