Add version in about dialog

This commit is contained in:
David Lechner
2021-01-18 17:29:03 -06:00
parent aa234eb3a6
commit ff34e5b01b
3 changed files with 9 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
REACT_APP_VERSION=$npm_package_version
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@pybricks/pybricks-code",
"version": "0.1.0",
"version": "1.0.0-beta.1",
"license": "MIT",
"author": "The Pybricks Authors",
"repository": {
+7 -1
View File
@@ -23,6 +23,8 @@ import en from './about-i18n.en.json';
import './about.scss';
const version = process.env.REACT_APP_VERSION;
type StateProps = { showAboutDialog: boolean };
type DispatchProps = { onClose: () => void; onLicenseButtonClick: () => void };
@@ -33,7 +35,11 @@ class AboutDialog extends React.Component<AboutDialogProps> {
render(): JSX.Element {
const { i18n, showAboutDialog, onClose, onLicenseButtonClick } = this.props;
return (
<Dialog title={appName} isOpen={showAboutDialog} onClose={() => onClose()}>
<Dialog
title={`${appName} v${version}`}
isOpen={showAboutDialog}
onClose={() => onClose()}
>
<div className={Classes.DIALOG_BODY}>
<div className="pb-about-icon">
<img src="favicon.ico" />