|
|
|
const inherits = require('util').inherits
|
|
|
|
const Component = require('react').Component
|
|
|
|
const h = require('react-hyperscript')
|
|
|
|
const connect = require('react-redux').connect
|
|
|
|
|
|
|
|
module.exports = connect(mapStateToProps)(InfoScreen)
|
|
|
|
|
|
|
|
function mapStateToProps (state) {
|
|
|
|
return {}
|
|
|
|
}
|
|
|
|
|
|
|
|
inherits(InfoScreen, Component)
|
|
|
|
function InfoScreen () {
|
|
|
|
Component.call(this)
|
|
|
|
}
|
|
|
|
|
|
|
|
InfoScreen.prototype.renderLogo = function () {
|
|
|
|
return (
|
|
|
|
h('div.settings__info-logo-wrapper', [
|
|
|
|
h('img.settings__info-logo', { src: 'images/info-logo.png' }),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
InfoScreen.prototype.renderInfoLinks = function () {
|
|
|
|
return (
|
|
|
|
h('div.settings__content-item.settings__content-item--without-height', [
|
|
|
|
h('div.settings__info-link-header', 'Links'),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/privacy.html',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
|
|
|
h('span.settings__info-link', 'Privacy Policy'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/terms.html',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
|
|
|
h('span.settings__info-link', 'Terms of Use'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/attributions.html',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
|
|
|
h('span.settings__info-link', 'Attributions'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('hr.settings__info-separator'),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://support.metamask.io',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
|
|
|
h('span.settings__info-link', 'Visit our Support Center'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/',
|
|
|
|
target: '_blank',
|
|
|
|
}, [
|
|
|
|
h('span.settings__info-link', 'Visit our web site'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
target: '_blank',
|
|
|
|
href: 'mailto:help@metamask.io?subject=Feedback',
|
|
|
|
}, [
|
|
|
|
h('span.settings__info-link', 'Email us!'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
InfoScreen.prototype.render = function () {
|
|
|
|
const version = global.platform.getVersion()
|
|
|
|
|
|
|
|
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'),
|
|
|
|
h('div.settings__info-version-number', `${version}`),
|
|
|
|
]),
|
|
|
|
h('div.settings__info-item', [
|
|
|
|
h(
|
|
|
|
'div.settings__info-about',
|
|
|
|
'MetaMask is designed and built in California.'
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
this.renderInfoLinks(),
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
InfoScreen.prototype.navigateTo = function (url) {
|
|
|
|
global.platform.openWindow({ url })
|
|
|
|
}
|
|
|
|
|