Display UI version on sidebar (#160)

This commit is contained in:
Jaco Greeff 2018-07-25 11:58:04 +02:00 committed by GitHub
parent a353c54b01
commit 6a7c9f3b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -17,6 +17,10 @@ import translate from './translate';
type Props = I18nProps & {};
const pkgJson = require('../package.json');
console.log('@polkadot/apps', pkgJson.version);
function updateTestInfo (chain?: string) {
keyring.setTestMode(isTestChain(chain));
}
@ -33,13 +37,16 @@ class NodeInfo extends React.PureComponent<Props> {
})}
onChange={updateTestInfo}
/>
<NodeName label={t('info.name', {
<NodeName label={t('info.clientName', {
defaultValue: 'client: '
})}
/>
<NodeVersion label={t('info.name', {
defaultValue: 'version: '
<NodeVersion label={t('info.clientVersion', {
defaultValue: 'client version: '
})} />
<div>{t('info.uiVersion', {
defaultValue: 'ui version:'
})} {pkgJson.version}</div>
</div>
);
}

View File

@ -19,10 +19,6 @@ import SideBar from './SideBar';
type Props = BareProps & {};
const pkgJson = require('../package.json');
console.log('@polkadot/apps', pkgJson.version);
function App ({ className, style }: Props) {
return (
<div