diff options
author | Frankie <frankie.diamond@gmail.com> | 2017-04-03 14:04:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-03 14:04:21 +0800 |
commit | 235a70b9392d8b87eae4fc141e7f0be1d7788ee2 (patch) | |
tree | e7db8e909888506a21fa6c2fbfa04a3fa2cbcfc1 /ui/app/info.js | |
parent | 0a5c634081656c9450d4341b96bab6b4134a0b7a (diff) | |
parent | 86e882c51afca3a44bf20bcd1025161e214e6998 (diff) | |
download | tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.tar tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.tar.gz tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.tar.bz2 tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.tar.lz tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.tar.xz tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.tar.zst tangerine-wallet-browser-235a70b9392d8b87eae4fc141e7f0be1d7788ee2.zip |
Merge pull request #1300 from MetaMask/platform
Introduce Platform API
Diffstat (limited to 'ui/app/info.js')
-rw-r--r-- | ui/app/info.js | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/ui/app/info.js b/ui/app/info.js index e79580be4..a6fdeb315 100644 --- a/ui/app/info.js +++ b/ui/app/info.js @@ -3,7 +3,6 @@ const Component = require('react').Component const h = require('react-hyperscript') const connect = require('react-redux').connect const actions = require('./actions') -const extension = require('../../app/scripts/lib/extension') module.exports = connect(mapStateToProps)(InfoScreen) @@ -17,13 +16,8 @@ function InfoScreen () { } InfoScreen.prototype.render = function () { - var state = this.props - var manifest - try { - manifest = extension.runtime.getManifest() - } catch (e) { - manifest = { version: '2.0.0' } - } + const state = this.props + const version = global.platform.getVersion() return ( h('.flex-column.flex-grow', [ @@ -53,7 +47,7 @@ InfoScreen.prototype.render = function () { style: { marginBottom: '10px', }, - }, `Version: ${manifest.version}`), + }, `Version: ${version}`), ]), h('div', { @@ -110,10 +104,12 @@ InfoScreen.prototype.render = function () { onClick (event) { this.navigateTo(event.target.href) }, }, [ h('img.icon-size', { - src: manifest.icons['128'], + src: 'images/icon-128.png', style: { - filter: 'grayscale(100%)', /* IE6-9 */ - WebkitFilter: 'grayscale(100%)', /* Microsoft Edge and Firefox 35+ */ + // IE6-9 + filter: 'grayscale(100%)', + // Microsoft Edge and Firefox 35+ + WebkitFilter: 'grayscale(100%)', }, }), h('div.info', 'Visit our web site'), @@ -139,7 +135,7 @@ InfoScreen.prototype.render = function () { h('a.info', { target: '_blank', style: { width: '85vw' }, - onClick () { extension.tabs.create({url: 'mailto:help@metamask.io?subject=Feedback'}) }, + onClick () { this.navigateTo('mailto:help@metamask.io?subject=Feedback') }, }, 'Email us!'), ]), @@ -158,5 +154,5 @@ InfoScreen.prototype.render = function () { } InfoScreen.prototype.navigateTo = function (url) { - extension.tabs.create({ url }) + global.platform.openWindow({ url }) } |