1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Create replacement logo for non-webgl

This commit is contained in:
Kevin Serrano 2016-08-19 14:47:49 -07:00
parent 30af7e96cb
commit 43e28788d7
2 changed files with 10 additions and 3 deletions

View File

@ -34,11 +34,17 @@ Mascot.prototype.render = function () {
}
Mascot.prototype.componentDidMount = function () {
if (!this.logo) return
var targetDivId = 'metamask-mascot-container'
var container = document.getElementById(targetDivId)
if (!this.logo) {
var staticLogo = document.createElement('img')
staticLogo.src = 'images/icon-128.png'
staticLogo.style.marginBottom = '20px'
container.appendChild(staticLogo)
} else {
container.appendChild(this.logo.canvas)
}
}
Mascot.prototype.componentWillUnmount = function () {
if (!this.logo) return

View File

@ -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)