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

Merge branch 'master' into notif2

This commit is contained in:
kumavis 2016-06-28 13:13:06 -07:00
commit 4777f82ae0
8 changed files with 33 additions and 7 deletions

View File

@ -5,6 +5,12 @@
- Fixed bug where MetaMask interfered with PDF loading. - Fixed bug where MetaMask interfered with PDF loading.
- Moved switch account icon into menu bar. - Moved switch account icon into menu bar.
- Changed status shapes to be a yellow warning sign for failure and ellipsis for pending transactions. - Changed status shapes to be a yellow warning sign for failure and ellipsis for pending transactions.
<<<<<<< HEAD
- Fix formatting on terms & conditions page.
=======
- Now enforce 30 character limit on wallet names.
>>>>>>> master
## 2.4.4 2016-06-23 ## 2.4.4 2016-06-23

View File

@ -144,8 +144,13 @@ function renderNotificationSVG(content, cb){
} }
function svgWrapper(content){ function svgWrapper(content){
<<<<<<< HEAD
var wrapperSource = ` var wrapperSource = `
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="240"> <svg xmlns="http://www.w3.org/2000/svg" width="360" height="240">
=======
var wrapperSource = `
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="300">
>>>>>>> master
<foreignObject x="0" y="0" width="100%" height="100%"> <foreignObject x="0" y="0" width="100%" height="100%">
<body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body> <body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body>
</foreignObject> </foreignObject>

View File

@ -65,12 +65,22 @@ function getCurrentDomain (cb) {
}) })
} }
function clearNotifications(){
chrome.notifications.getAll(function (object) {
for (let notification in object){
chrome.notifications.clear(notification)
}
})
}
function setupApp (err, opts) { function setupApp (err, opts) {
if (err) { if (err) {
alert(err.stack) alert(err.stack)
throw err throw err
} }
clearNotifications()
var container = document.getElementById('app-content') var container = document.getElementById('app-content')
MetaMaskUi({ MetaMaskUi({

View File

@ -145,7 +145,7 @@ AccountDetailScreen.prototype.render = function () {
style: { style: {
margin: 10, margin: 10,
}, },
}, 'SEND ETH'), }, 'SEND'),
]), ]),

View File

@ -355,4 +355,3 @@ App.prototype.toggleMetamaskActive = function () {
this.props.dispatch(actions.lockMetamask(false)) this.props.dispatch(actions.lockMetamask(false))
} }
} }

View File

@ -18,6 +18,7 @@ EditableLabel.prototype.render = function () {
return h('div.editable-label', [ return h('div.editable-label', [
h('input.sizing-input', { h('input.sizing-input', {
defaultValue: props.textValue, defaultValue: props.textValue,
maxLength: '30',
onKeyPress: (event) => { onKeyPress: (event) => {
this.saveIfEnter(event) this.saveIfEnter(event)
}, },
@ -44,6 +45,7 @@ EditableLabel.prototype.saveIfEnter = function (event) {
EditableLabel.prototype.saveText = function () { EditableLabel.prototype.saveText = function () {
var container = findDOMNode(this) var container = findDOMNode(this)
var text = container.querySelector('.editable-label input').value var text = container.querySelector('.editable-label input').value
this.props.saveText(text) var truncatedText = text.substring(0, 30)
this.setState({ isEditingLabel: false, textLabel: text }) this.props.saveText(truncatedText)
this.setState({ isEditingLabel: false, textLabel: truncatedText })
} }

View File

@ -38,7 +38,7 @@ DisclaimerScreen.prototype.render = function () {
style: { style: {
whiteSpace: 'pre-line', whiteSpace: 'pre-line',
background: 'rgb(235, 235, 235)', background: 'rgb(235, 235, 235)',
height: '336px', height: '310px',
padding: '6px', padding: '6px',
width: '80%', width: '80%',
overflowY: 'scroll', overflowY: 'scroll',

View File

@ -216,6 +216,11 @@ SendTransactionScreen.prototype.onSubmit = function () {
return this.props.dispatch(actions.displayWarning(message)) return this.props.dispatch(actions.displayWarning(message))
} }
if (input < 0) {
message = 'Can not send negative amounts of ETH.'
return this.props.dispatch(actions.displayWarning(message))
}
if ((!util.isValidAddress(recipient) && !txData) || (!recipient && !txData)) { if ((!util.isValidAddress(recipient) && !txData) || (!recipient && !txData)) {
message = 'Recipient address is invalid.' message = 'Recipient address is invalid.'
return this.props.dispatch(actions.displayWarning(message)) return this.props.dispatch(actions.displayWarning(message))
@ -234,4 +239,3 @@ SendTransactionScreen.prototype.onSubmit = function () {
this.props.dispatch(actions.signTx(txParams)) this.props.dispatch(actions.signTx(txParams))
} }