-
-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
120 changed files
with
1,767 additions
and
808 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
.../coresandbox/src/customizations/volto/components/manage/Controlpanels/VersionOverview.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import { FormattedMessage } from 'react-intl'; | ||
import isEmpty from 'lodash/isEmpty'; | ||
|
||
import voltoPackageJson from '@plone/volto/../package.json'; | ||
import projectPackageJson from '@root/../package.json'; | ||
|
||
import { defineMessages, useIntl } from 'react-intl'; | ||
import config from '@plone/volto/registry'; | ||
|
||
const messages = defineMessages({ | ||
no_addons: { | ||
id: 'No addons found', | ||
defaultMessage: 'No addons found', | ||
}, | ||
}); | ||
|
||
const voltoVersion = voltoPackageJson.version; | ||
|
||
const VersionOverview = ({ | ||
cmf_version, | ||
debug_mode, | ||
pil_version, | ||
plone_version, | ||
plone_restapi_version, | ||
python_version, | ||
zope_version, | ||
}) => { | ||
const intl = useIntl(); | ||
const { addonsInfo } = config.settings; | ||
const isProject = voltoPackageJson.name !== projectPackageJson.name; | ||
|
||
return ( | ||
<> | ||
<h2> | ||
This is a customized Route Component from @plone/volto-coresandbox | ||
</h2> | ||
<ul | ||
style={{ | ||
fontSize: '16px', | ||
fontFamily: 'Monospace', | ||
paddingLeft: '1rem', | ||
}} | ||
> | ||
{isProject ? ( | ||
<li> | ||
{projectPackageJson.name} {projectPackageJson.version} | ||
</li> | ||
) : null} | ||
{voltoVersion && <li>Volto {voltoVersion}</li>} | ||
<li>Plone {plone_version}</li> | ||
<li>plone.restapi {plone_restapi_version}</li> | ||
<li>CMF {cmf_version}</li> | ||
<li>Zope {zope_version}</li> | ||
<li>Python {python_version}</li> | ||
<li>PIL {pil_version}</li> | ||
</ul> | ||
<h3>Add-ons</h3> | ||
{isEmpty(addonsInfo) ? ( | ||
<p>{intl.formatMessage(messages.no_addons)}</p> | ||
) : ( | ||
<ul style={{ fontSize: '16px', fontFamily: 'Monospace' }}> | ||
{addonsInfo.map((addon) => ( | ||
<li key={addon.name}>{`${addon.name} ${addon.version || ''}`}</li> | ||
))} | ||
</ul> | ||
)} | ||
{debug_mode !== 'No' && ( | ||
<p> | ||
<FormattedMessage | ||
id="Warning Regarding debug mode" | ||
defaultMessage="You are running in 'debug mode'. This mode is intended for sites that are under development. This allows many configuration changes to be immediately visible, but will make your site run more slowly. To turn off debug mode, stop the server, set 'debug-mode=off' in your buildout.cfg, re-run bin/buildout and then restart the server process." | ||
/> | ||
</p> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default VersionOverview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ eslint.xml | |
yarn-error.log | ||
build | ||
.changelog.draft | ||
dist | ||
|
||
# yarn 3 | ||
.pnp.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./babel.cjs'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- This file is only being used by the "vite build" command as it takes the "module" script entries --> | ||
<!-- and transpile them. The actual dev/prod build is not using it at all --> | ||
<!-- Remove when copleting the migration to RR7 --> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
</head> | ||
<body> | ||
<div role="navigation" aria-label="Toolbar" id="toolbar"></div> | ||
<div id="main"></div> | ||
<div role="complementary" aria-label="Sidebar" id="sidebar"></div> | ||
<script type="module" src="/src/entry-client.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.