From 753f1b2fc546c213da22dab05c7ec894047de63a Mon Sep 17 00:00:00 2001 From: Chris L Date: Thu, 14 Sep 2023 16:20:05 +0200 Subject: [PATCH] Display checklist for new ESC firmware, link to release notes #412 --- src/Components/FirmwareSelector/index.jsx | 41 +++++++++++++++++++++ src/Components/Home/index.jsx | 3 +- src/Components/Home/style.scss | 11 ------ src/Components/MainContent/style.scss | 44 +++++++++++++++++++---- src/sources/Bluejay/index.js | 2 +- src/sources/GithubSource.js | 1 + src/translations/en/common.json | 8 ++++- 7 files changed, 88 insertions(+), 22 deletions(-) diff --git a/src/Components/FirmwareSelector/index.jsx b/src/Components/FirmwareSelector/index.jsx index e1a166780..0b3e0eeac 100644 --- a/src/Components/FirmwareSelector/index.jsx +++ b/src/Components/FirmwareSelector/index.jsx @@ -66,6 +66,7 @@ function FirmwareSelector({ version: null, url: null, pwm: null, + releaseUrl: null, }); const [layoutSelectionDisabled, setLayoutSelectionDisabled] = useState(false); @@ -133,6 +134,7 @@ function FirmwareSelector({ key: version.key, value: version.url, name: version.name, + releaseUrl: version.releaseUrl ? version.releaseUrl : null, })); const firmwareOptions = validFirmware.map((key) => ({ @@ -205,6 +207,8 @@ function FirmwareSelector({ const selected = e.target.options.selectedIndex; const selectedOption = e.target.options[selected]; + const releaseUrl = options.versions[selected - 1].releaseUrl; + const firmwareName = selection.firmware; const firmwareVersion = options.versions[selected - 1].key; @@ -223,6 +227,7 @@ function FirmwareSelector({ setSelection({ ...selection, url: e.target.value, + releaseUrl, version: selectedOption && options.versions[selected - 1].key, }); }, [options, selection]); @@ -375,6 +380,42 @@ function FirmwareSelector({ />} } +
+

+ + {t('selectionAttention')} + +

+ +

+ {t('selectionHint')} +

+ +

+

+

+ + {selection.releaseUrl && + + {t('selectionLinkText')} + } +
+