Make the version number in the about dialog clickable (#817)

* Make the version number in the about dialog clickable

* Fix prettier errors

* Fix build errors
This commit is contained in:
rochakjain361 2021-03-12 20:56:41 +05:30 committed by GitHub
parent 43f2d82956
commit 5a259ef3ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -45,7 +45,22 @@ const AboutDialog = ({ open, onClose }) => {
<TableCell align="right" component="th" scope="row">
{translate('menu.version')}:
</TableCell>
<TableCell align="left">{config.version}</TableCell>
{config.version === 'dev' ? (
<TableCell align="left"> {config.version} </TableCell>
) : (
<TableCell align="left">
<Link
href={`https://github.com/navidrome/navidrome/releases/tag/v${
config.version.split(' ')[0]
}`}
target="_blank"
rel="noopener noreferrer"
>
{config.version.split(' ')[0]}
</Link>
{' ' + config.version.split(' ')[1]}
</TableCell>
)}
</TableRow>
{Object.keys(links).map((key) => {
return (