diff --git a/src/about/AboutDialog.test.tsx b/src/about/AboutDialog.test.tsx index 34b2e504..e4c638d2 100644 --- a/src/about/AboutDialog.test.tsx +++ b/src/about/AboutDialog.test.tsx @@ -50,7 +50,7 @@ it('should manage license dialog open/close', async () => { , ); - userEvent.click(screen.getByText('Open Source Licenses')); + userEvent.click(screen.getByText('Software Licenses')); expect( screen.getByText('Pybricks Code is built on open source software.', { diff --git a/src/about/AboutDialog.tsx b/src/about/AboutDialog.tsx index cd880f1d..c120b016 100644 --- a/src/about/AboutDialog.tsx +++ b/src/about/AboutDialog.tsx @@ -10,6 +10,7 @@ import { connect } from 'react-redux'; import { appName, appVersion, + changelogUrl, legoDisclaimer, pybricksCopyright, pybricksWebsiteUrl, @@ -57,6 +58,10 @@ class AboutDialog extends React.Component { > {i18n.translate(AboutStringId.LicenseButtonLabel)} + + {i18n.translate(AboutStringId.ChangelogButtonLabel)}  + + {i18n.translate(AboutStringId.WebsiteButtonLabel)}  diff --git a/src/about/i18n.en.json b/src/about/i18n.en.json index a3f45e2e..b57121db 100644 --- a/src/about/i18n.en.json +++ b/src/about/i18n.en.json @@ -1,7 +1,8 @@ { "about": { "description": "MicroPython for LEGO® Powered Up smart hubs.", - "licenseButton": { "label": "Open Source Licenses" }, + "licenseButton": { "label": "Software Licenses" }, + "changelogButton": { "label": "Changelog" }, "websiteButton": { "label": "Pybricks Website" } } } diff --git a/src/about/i18n.ts b/src/about/i18n.ts index 04a9ba9d..02001d88 100644 --- a/src/about/i18n.ts +++ b/src/about/i18n.ts @@ -6,5 +6,6 @@ export enum AboutStringId { Description = 'about.description', LicenseButtonLabel = 'about.licenseButton.label', + ChangelogButtonLabel = 'about.changelogButton.label', WebsiteButtonLabel = 'about.websiteButton.label', } diff --git a/src/app/constants.ts b/src/app/constants.ts index c0c849e4..806d166b 100644 --- a/src/app/constants.ts +++ b/src/app/constants.ts @@ -13,6 +13,10 @@ export const appName = process.env.REACT_APP_NAME || 'REACT_APP_NAME is undefine export const appVersion = process.env.REACT_APP_VERSION || 'REACT_APP_VERSION is undefined'; +/** URL to Pybricks Code changelog. */ +export const changelogUrl = + 'https://github.com/pybricks/pybricks-code/blob/master/CHANGELOG.md'; + /** URL to main Pybricks website. */ export const pybricksWebsiteUrl = 'https://pybricks.com'; diff --git a/src/index.scss b/src/index.scss index f5c7cb43..0d3d22f9 100644 --- a/src/index.scss +++ b/src/index.scss @@ -44,10 +44,19 @@ body { user-select: none; } +a.#{$ns}-button { + text-align: left; +} + .#{$ns}-button-text > img { display: block; } +.#{$ns}-dialog-footer-actions { + flex-wrap: wrap; + row-gap: 10px; +} + .#{$ns}-form-group > .#{$ns}-label { font-weight: bolder; } diff --git a/src/licenses/i18n.en.json b/src/licenses/i18n.en.json index e49f0af1..2e742c83 100644 --- a/src/licenses/i18n.en.json +++ b/src/licenses/i18n.en.json @@ -1,6 +1,6 @@ { "license": { - "title": "Open Source Licenses", + "title": "Open Source Software Licenses", "description": "{name} is built on open source software. By using {name} you are agreeing to the terms and conditions of all of the included software licenses.", "packageLabel": "Package:", "authorLabel": "Author:",