2017-11-29 05:24:35 +01:00
|
|
|
const { Component } = require('react')
|
|
|
|
const PropTypes = require('prop-types')
|
|
|
|
const h = require('react-hyperscript')
|
|
|
|
|
|
|
|
class Info extends Component {
|
2018-04-19 03:34:44 +02:00
|
|
|
constructor (props) {
|
|
|
|
super(props)
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
version: global.platform.getVersion(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-29 05:24:35 +01:00
|
|
|
renderLogo () {
|
|
|
|
return (
|
|
|
|
h('div.settings__info-logo-wrapper', [
|
|
|
|
h('img.settings__info-logo', { src: 'images/info-logo.png' }),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
renderInfoLinks () {
|
|
|
|
return (
|
|
|
|
h('div.settings__content-item.settings__content-item--without-height', [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('div.settings__info-link-header', this.context.t('links')),
|
2017-11-29 05:24:35 +01:00
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/privacy.html',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('span.settings__info-link', this.context.t('privacyMsg')),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/terms.html',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('span.settings__info-link', this.context.t('terms')),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/attributions.html',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('span.settings__info-link', this.context.t('attributions')),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('hr.settings__info-separator'),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://support.metamask.io',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('span.settings__info-link', this.context.t('supportCenter')),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('span.settings__info-link', this.context.t('visitWebSite')),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
target: '_blank',
|
|
|
|
href: 'mailto:help@metamask.io?subject=Feedback',
|
|
|
|
}, [
|
2018-03-31 01:18:48 +02:00
|
|
|
h('span.settings__info-link', this.context.t('emailUs')),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
h('div.settings__content', [
|
|
|
|
h('div.settings__content-row', [
|
|
|
|
h('div.settings__content-item.settings__content-item--without-height', [
|
|
|
|
this.renderLogo(),
|
|
|
|
h('div.settings__info-item', [
|
|
|
|
h('div.settings__info-version-header', 'MetaMask Version'),
|
2018-04-19 03:34:44 +02:00
|
|
|
h('div.settings__info-version-number', this.state.version),
|
2017-11-29 05:24:35 +01:00
|
|
|
]),
|
|
|
|
h('div.settings__info-item', [
|
|
|
|
h(
|
|
|
|
'div.settings__info-about',
|
2018-03-31 01:18:48 +02:00
|
|
|
this.context.t('builtInCalifornia')
|
2017-11-29 05:24:35 +01:00
|
|
|
),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
this.renderInfoLinks(),
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Info.propTypes = {
|
|
|
|
tab: PropTypes.string,
|
|
|
|
metamask: PropTypes.object,
|
|
|
|
setCurrentCurrency: PropTypes.func,
|
|
|
|
setRpcTarget: PropTypes.func,
|
|
|
|
displayWarning: PropTypes.func,
|
|
|
|
revealSeedConfirmation: PropTypes.func,
|
|
|
|
warning: PropTypes.string,
|
|
|
|
location: PropTypes.object,
|
|
|
|
history: PropTypes.object,
|
2018-03-29 18:37:29 +02:00
|
|
|
t: PropTypes.func,
|
2017-11-29 05:24:35 +01:00
|
|
|
}
|
|
|
|
|
2018-03-31 01:18:48 +02:00
|
|
|
Info.contextTypes = {
|
|
|
|
t: PropTypes.func,
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Info
|