aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-24 07:02:06 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-24 07:02:06 +0800
commitbc43e3d1406e42783b6983e87a947d51218d1923 (patch)
tree4890814ee10786faa91d4e5e8e74ec942524d59d /ui
parent65f765648735fec9b5180d3a7706048d611e48ba (diff)
parenta0c7b0b1a224c71091bdc221e0e6ad3c2550ee2e (diff)
downloadtangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.tar
tangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.tar.gz
tangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.tar.bz2
tangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.tar.lz
tangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.tar.xz
tangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.tar.zst
tangerine-wallet-browser-bc43e3d1406e42783b6983e87a947d51218d1923.zip
Merge branch 'master' into PopupNotifications
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/mascot.js18
-rw-r--r--ui/app/unlock.js3
2 files changed, 14 insertions, 7 deletions
diff --git a/ui/app/components/mascot.js b/ui/app/components/mascot.js
index ddd51f8ba..f2b00262b 100644
--- a/ui/app/components/mascot.js
+++ b/ui/app/components/mascot.js
@@ -14,8 +14,9 @@ function Mascot () {
pxNotRatio: true,
width: 200,
height: 200,
+ staticImage: './images/icon-512.png',
})
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
this.refollowMouse = debounce(this.logo.setFollowMouse.bind(this.logo, true), 1000)
this.unfollowMouse = this.logo.setFollowMouse.bind(this.logo, false)
}
@@ -34,19 +35,24 @@ Mascot.prototype.render = function () {
}
Mascot.prototype.componentDidMount = function () {
- if (!this.logo) return
var targetDivId = 'metamask-mascot-container'
var container = document.getElementById(targetDivId)
- container.appendChild(this.logo.canvas)
+ if (!this.logo.webGLSupport) {
+ var staticLogo = this.logo.staticLogo
+ staticLogo.style.marginBottom = '40px'
+ container.appendChild(staticLogo)
+ } else {
+ container.appendChild(this.logo.canvas)
+ }
}
Mascot.prototype.componentWillUnmount = function () {
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
this.logo.canvas.remove()
}
Mascot.prototype.handleAnimationEvents = function () {
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
// only setup listeners once
if (this.animations) return
this.animations = this.props.animationEventEmitter
@@ -55,7 +61,7 @@ Mascot.prototype.handleAnimationEvents = function () {
}
Mascot.prototype.lookAt = function (target) {
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
this.unfollowMouse()
this.logo.lookAt(target)
this.refollowMouse()
diff --git a/ui/app/unlock.js b/ui/app/unlock.js
index a7896d640..7cc1699c3 100644
--- a/ui/app/unlock.js
+++ b/ui/app/unlock.js
@@ -3,10 +3,11 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('./actions')
-const Mascot = require('./components/mascot')
const getCaretCoordinates = require('textarea-caret')
const EventEmitter = require('events').EventEmitter
+const Mascot = require('./components/mascot')
+
module.exports = connect(mapStateToProps)(UnlockScreen)
inherits(UnlockScreen, Component)