2017-11-14 08:04:23 -08:00
|
|
|
const inherits = require('util').inherits
|
|
|
|
const Component = require('react').Component
|
|
|
|
const h = require('react-hyperscript')
|
|
|
|
const connect = require('react-redux').connect
|
2017-11-15 09:35:18 -08:00
|
|
|
const actions = require('../../ui/app/actions')
|
2017-11-14 08:04:23 -08:00
|
|
|
|
|
|
|
module.exports = connect(mapStateToProps)(InfoScreen)
|
|
|
|
|
|
|
|
function mapStateToProps (state) {
|
|
|
|
return {}
|
|
|
|
}
|
|
|
|
|
|
|
|
inherits(InfoScreen, Component)
|
|
|
|
function InfoScreen () {
|
|
|
|
Component.call(this)
|
|
|
|
}
|
|
|
|
|
|
|
|
InfoScreen.prototype.render = function () {
|
|
|
|
const state = this.props
|
|
|
|
const version = global.platform.getVersion()
|
|
|
|
|
|
|
|
return (
|
|
|
|
h('.flex-column.flex-grow', {
|
|
|
|
style: {
|
|
|
|
maxWidth: '400px',
|
|
|
|
},
|
|
|
|
}, [
|
|
|
|
|
|
|
|
// subtitle and nav
|
|
|
|
h('.section-title.flex-row.flex-center', [
|
|
|
|
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
|
|
|
|
onClick: (event) => {
|
|
|
|
state.dispatch(actions.goHome())
|
|
|
|
},
|
2018-07-27 08:21:01 -07:00
|
|
|
style: {
|
|
|
|
position: 'absolute',
|
|
|
|
left: '33px',
|
2018-07-27 09:54:23 -07:00
|
|
|
},
|
2017-11-14 08:04:23 -08:00
|
|
|
}),
|
|
|
|
h('h2.page-subtitle', 'Info'),
|
|
|
|
]),
|
|
|
|
|
|
|
|
// main view
|
|
|
|
h('.flex-column.flex-justify-center.flex-grow.select-none', [
|
|
|
|
h('.flex-space-around', {
|
|
|
|
style: {
|
|
|
|
padding: '20px',
|
|
|
|
},
|
|
|
|
}, [
|
|
|
|
// current version number
|
|
|
|
|
2018-07-30 06:01:21 -07:00
|
|
|
h('.info', [
|
2018-07-18 02:42:29 -07:00
|
|
|
h('div', 'Nifty Wallet'),
|
2017-11-14 08:04:23 -08:00
|
|
|
h('div', {
|
|
|
|
style: {
|
|
|
|
marginBottom: '10px',
|
|
|
|
},
|
|
|
|
}, `Version: ${version}`),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
InfoScreen.prototype.navigateTo = function (url) {
|
|
|
|
global.platform.openWindow({ url })
|
|
|
|
}
|
|
|
|
|