aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/images/icon-512.pngbin0 -> 42078 bytes
-rw-r--r--package.json4
-rw-r--r--ui/app/components/mascot.js18
-rw-r--r--ui/app/unlock.js3
5 files changed, 17 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08cb59976..25f308d78 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## Current Master
- Changed transaction approval from notifications system to popup system.
+- Added static image as fallback for when WebGL isn't supported.
- Transaction history now has a hard limit.
- Added info link on account screen that visits Etherscan.
diff --git a/app/images/icon-512.png b/app/images/icon-512.png
new file mode 100644
index 000000000..9c0d1384d
--- /dev/null
+++ b/app/images/icon-512.png
Binary files differ
diff --git a/package.json b/package.json
index 9263d1aaf..57d71e865 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"inject-css": "^0.1.1",
"jazzicon": "^1.1.3",
"menu-droppo": "^1.1.0",
- "metamask-logo": "^1.1.5",
+ "metamask-logo": "^1.3.1",
"mississippi": "^1.2.0",
"multiplex": "^6.7.0",
"once": "^1.3.3",
@@ -76,7 +76,7 @@
"three.js": "^0.73.2",
"through2": "^2.0.1",
"vreme": "^3.0.2",
- "web3": "ethereum/web3.js#0.16.0",
+ "web3": "^0.17.0-alpha",
"web3-provider-engine": "^7.8.3",
"web3-stream-provider": "^2.0.6",
"xtend": "^4.0.1"
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)