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:
parent
30af7e96cb
commit
43e28788d7
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user