Skip to content

Commit

Permalink
Show project name and version in control panel (#4176)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Jan 10, 2023
1 parent 483ce0d commit eb7ad88
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/4176.feature
@@ -0,0 +1 @@
Show project name and version in control panel @sneridagh
15 changes: 14 additions & 1 deletion src/components/manage/Controlpanels/VersionOverview.jsx
Expand Up @@ -7,7 +7,14 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';
import { isEmpty } from 'lodash';

import { version as voltoVersion } from '../../../../package.json';
import {
version as voltoVersion,
name as voltoName,
} from '../../../../package.json';
import {
version as projectVersion,
name as projectName,
} from '@root/../package.json';

import { defineMessages, useIntl } from 'react-intl';
import config from '@plone/volto/registry';
Expand All @@ -30,6 +37,7 @@ const VersionOverview = ({
}) => {
const intl = useIntl();
const { addonsInfo } = config.settings;
const isProject = voltoName !== projectName;

return (
<>
Expand All @@ -40,6 +48,11 @@ const VersionOverview = ({
paddingLeft: '1rem',
}}
>
{isProject ? (
<li>
{projectName} {projectVersion}
</li>
) : null}
{voltoVersion && <li>Volto {voltoVersion}</li>}
<li>Plone {plone_version}</li>
<li>plone.restapi {plone_restapi_version}</li>
Expand Down

0 comments on commit eb7ad88

Please sign in to comment.