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

Merge pull request #352 from MetaMask/pr/351

Limit account nicknames
This commit is contained in:
kumavis 2016-06-28 13:16:41 -07:00 committed by GitHub
commit f1a94afca7
3 changed files with 5 additions and 7 deletions

View File

@ -5,13 +5,11 @@
- 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 - Now enforce 20 character limit on wallet names.
- Wallet titles are now properly truncated in transaction confirmation.
- Fix formatting on terms & conditions page. - Fix formatting on terms & conditions page.
=======
- Now enforce 30 character limit on wallet names. - Now enforce 30 character limit on wallet names.
>>>>>>> master
## 2.4.4 2016-06-23 ## 2.4.4 2016-06-23
- Update web3-stream-provider for batch payload bug fix - Update web3-stream-provider for batch payload bug fix

View File

@ -48,7 +48,7 @@ AccountPanel.prototype.render = function () {
address: panelState.identiconKey, address: panelState.identiconKey,
imageify: state.imageifyIdenticons, imageify: state.imageifyIdenticons,
}), }),
h('span.font-small', panelState.identiconLabel), h('span.font-small', panelState.identiconLabel.substring(0, 7) + '...'),
]), ]),
// account address, balance // account address, balance

View File

@ -18,7 +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', maxLength: '20',
onKeyPress: (event) => { onKeyPress: (event) => {
this.saveIfEnter(event) this.saveIfEnter(event)
}, },
@ -45,7 +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
var truncatedText = text.substring(0, 30) var truncatedText = text.substring(0, 20)
this.props.saveText(truncatedText) this.props.saveText(truncatedText)
this.setState({ isEditingLabel: false, textLabel: truncatedText }) this.setState({ isEditingLabel: false, textLabel: truncatedText })
} }