Merge "Remove parentheses around email in account-label"
This commit is contained in:
@@ -42,7 +42,7 @@ limitations under the License.
|
||||
<span class="text">
|
||||
<span>[[account.name]]</span>
|
||||
<span hidden$="[[!_computeShowEmail(showEmail, account)]]">
|
||||
([[account.email]])
|
||||
[[_computeEmailStr(account)]]
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -44,5 +44,12 @@
|
||||
_computeShowEmail: function(showEmail, account) {
|
||||
return !!(showEmail && account && account.email);
|
||||
},
|
||||
|
||||
_computeEmailStr: function(account) {
|
||||
if (account.name) {
|
||||
return '(' + account.email + ')';
|
||||
}
|
||||
return account.email;
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -71,6 +71,9 @@ limitations under the License.
|
||||
|
||||
assert.equal(element._computeShowEmail(
|
||||
false, undefined), false);
|
||||
|
||||
assert.equal(element._computeEmailStr({name: 'test', email: 'test'}), '(test)');
|
||||
assert.equal(element._computeEmailStr({email: 'test'}, ''), 'test');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user