2016-04-14 00:28:44 +02:00
|
|
|
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)
|
|
|
|
|
2016-06-21 22:18:32 +02:00
|
|
|
function mapStateToProps (state) {
|
2016-04-14 00:28:44 +02:00
|
|
|
return {}
|
|
|
|
}
|
|
|
|
|
|
|
|
inherits(InfoScreen, Component)
|
2016-06-21 22:18:32 +02:00
|
|
|
function InfoScreen () {
|
2016-04-14 00:28:44 +02:00
|
|
|
Component.call(this)
|
|
|
|
}
|
|
|
|
|
2018-02-01 03:24:20 +01:00
|
|
|
InfoScreen.prototype.renderLogo = function () {
|
2016-04-14 00:28:44 +02:00
|
|
|
return (
|
2018-02-01 03:24:20 +01:00
|
|
|
h('div.settings__info-logo-wrapper', [
|
|
|
|
h('img.settings__info-logo', { src: 'images/info-logo.png' }),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
2016-04-14 00:28:44 +02:00
|
|
|
|
2018-02-01 03:24:20 +01:00
|
|
|
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'),
|
|
|
|
]),
|
2016-04-14 00:28:44 +02:00
|
|
|
]),
|
2018-02-01 03:24:20 +01:00
|
|
|
h('div.settings__info-link-item', [
|
|
|
|
h('a', {
|
|
|
|
href: 'https://metamask.io/terms.html',
|
|
|
|
target: '_blank',
|
2016-04-14 00:28:44 +02:00
|
|
|
}, [
|
2018-02-01 03:24:20 +01:00
|
|
|
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!'),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
2017-07-27 22:57:01 +02:00
|
|
|
|
2018-02-01 03:24:20 +01:00
|
|
|
InfoScreen.prototype.render = function () {
|
|
|
|
const version = global.platform.getVersion()
|
2016-06-21 22:18:32 +02:00
|
|
|
|
2018-02-01 03:24:20 +01:00
|
|
|
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.'
|
|
|
|
),
|
|
|
|
]),
|
2016-04-14 00:28:44 +02:00
|
|
|
]),
|
2018-02-01 03:24:20 +01:00
|
|
|
this.renderInfoLinks(),
|
2016-04-14 00:28:44 +02:00
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2016-06-21 22:18:32 +02:00
|
|
|
InfoScreen.prototype.navigateTo = function (url) {
|
2017-04-01 03:04:13 +02:00
|
|
|
global.platform.openWindow({ url })
|
2016-04-14 00:28:44 +02:00
|
|
|
}
|
2017-06-14 02:47:56 +02:00
|
|
|
|