1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 05:12:18 +01:00
metamask-extension/ui/app/info.js

111 lines
2.9 KiB
JavaScript
Raw Normal View History

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) {
return {}
}
inherits(InfoScreen, Component)
2016-06-21 22:18:32 +02:00
function InfoScreen () {
Component.call(this)
}
2018-02-01 03:24:20 +01:00
InfoScreen.prototype.renderLogo = function () {
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' }),
])
)
}
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'),
]),
]),
2018-02-01 03:24:20 +01:00
h('div.settings__info-link-item', [
h('a', {
href: 'https://metamask.io/terms.html',
target: '_blank',
}, [
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.'
),
]),
]),
2018-02-01 03:24:20 +01:00
this.renderInfoLinks(),
]),
])
)
}
2016-06-21 22:18:32 +02:00
InfoScreen.prototype.navigateTo = function (url) {
global.platform.openWindow({ url })
}