Show version in Electron (#1730)
* Add app version to both support us page and help menu * Typescriptery
This commit is contained in:
parent
9e844b71f9
commit
a8740e0fc2
|
@ -2,7 +2,13 @@ import React from 'react';
|
|||
import translate from 'translations';
|
||||
import TabSection from 'containers/TabSection';
|
||||
import logo from 'assets/images/logo-mycrypto-transparent.svg';
|
||||
import { donationAddressMap, socialMediaLinks, productLinks, affiliateLinks } from 'config';
|
||||
import {
|
||||
donationAddressMap,
|
||||
socialMediaLinks,
|
||||
productLinks,
|
||||
affiliateLinks,
|
||||
VERSION
|
||||
} from 'config';
|
||||
import DisclaimerModal from 'components/DisclaimerModal';
|
||||
import { NewTabLink } from 'components/ui';
|
||||
import './index.scss';
|
||||
|
@ -47,6 +53,7 @@ export default class SupportPage extends React.Component<{}, State> {
|
|||
<div className="SupportPage-mycrypto-legal-text">
|
||||
<a onClick={this.openDisclaimer}>{translate('DISCLAIMER')}</a>
|
||||
</div>
|
||||
<div className="SupportPage-mycrypto-legal-text">v{VERSION}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { MenuItemConstructorOptions, shell } from 'electron';
|
||||
import { APP_TITLE, REPOSITORY } from '../constants';
|
||||
import packageJson from '../../package.json';
|
||||
|
||||
const MENU: MenuItemConstructorOptions[] = [
|
||||
{
|
||||
|
@ -32,9 +33,14 @@ const MENU: MenuItemConstructorOptions[] = [
|
|||
}
|
||||
];
|
||||
|
||||
const HELP_MENU = {
|
||||
const HELP_MENU: MenuItemConstructorOptions = {
|
||||
role: 'help',
|
||||
submenu: [
|
||||
{
|
||||
label: `v${packageJson.version}`,
|
||||
enabled: false
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Help / FAQ',
|
||||
click() {
|
||||
|
@ -68,7 +74,7 @@ if (process.platform === 'darwin') {
|
|||
MENU.push({
|
||||
...HELP_MENU,
|
||||
submenu: [
|
||||
...HELP_MENU.submenu,
|
||||
...(HELP_MENU.submenu as MenuItemConstructorOptions[]),
|
||||
{
|
||||
label: 'Speech',
|
||||
submenu: [{ role: 'startspeaking' }, { role: 'stopspeaking' }]
|
||||
|
|
Loading…
Reference in New Issue