diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-06-29 04:16:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 04:16:41 +0800 |
commit | f1a94afca73e2af9d227659748d9ec33ee31b9d3 (patch) | |
tree | 49362cd9c10c8170bc11e3e1f6c2eff819ca63df /ui | |
parent | 913533522f650e340a369103f2d8018a92ad9bc1 (diff) | |
parent | 19f9d6566bb9a8f28a33de8e235fbb28b0c2c021 (diff) | |
download | tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.tar tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.tar.gz tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.tar.bz2 tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.tar.lz tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.tar.xz tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.tar.zst tangerine-wallet-browser-f1a94afca73e2af9d227659748d9ec33ee31b9d3.zip |
Merge pull request #352 from MetaMask/pr/351
Limit account nicknames
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/account-panel.js | 2 | ||||
-rw-r--r-- | ui/app/components/editable-label.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/app/components/account-panel.js b/ui/app/components/account-panel.js index c69557d62..d50522fa2 100644 --- a/ui/app/components/account-panel.js +++ b/ui/app/components/account-panel.js @@ -48,7 +48,7 @@ AccountPanel.prototype.render = function () { address: panelState.identiconKey, imageify: state.imageifyIdenticons, }), - h('span.font-small', panelState.identiconLabel), + h('span.font-small', panelState.identiconLabel.substring(0, 7) + '...'), ]), // account address, balance diff --git a/ui/app/components/editable-label.js b/ui/app/components/editable-label.js index 05ffd4c92..41936f5e0 100644 --- a/ui/app/components/editable-label.js +++ b/ui/app/components/editable-label.js @@ -18,7 +18,7 @@ EditableLabel.prototype.render = function () { return h('div.editable-label', [ h('input.sizing-input', { defaultValue: props.textValue, - maxLength: '30', + maxLength: '20', onKeyPress: (event) => { this.saveIfEnter(event) }, @@ -45,7 +45,7 @@ EditableLabel.prototype.saveIfEnter = function (event) { EditableLabel.prototype.saveText = function () { var container = findDOMNode(this) 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.setState({ isEditingLabel: false, textLabel: truncatedText }) } |