Display threepids slightly prettier
ie. Put a + on the front of msisdns.pull/21833/head
parent
925bbb79ad
commit
b06111202d
|
@ -755,6 +755,14 @@ module.exports = React.createClass({
|
||||||
return medium[0].toUpperCase() + medium.slice(1);
|
return medium[0].toUpperCase() + medium.slice(1);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
presentableTextForThreepid: function(threepid) {
|
||||||
|
if (threepid.medium == 'msisdn') {
|
||||||
|
return '+' + threepid.address;
|
||||||
|
} else {
|
||||||
|
return threepid.address;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var Loader = sdk.getComponent("elements.Spinner");
|
var Loader = sdk.getComponent("elements.Spinner");
|
||||||
switch (this.state.phase) {
|
switch (this.state.phase) {
|
||||||
|
@ -787,7 +795,9 @@ module.exports = React.createClass({
|
||||||
<label htmlFor={id}>{this.nameForMedium(val.medium)}</label>
|
<label htmlFor={id}>{this.nameForMedium(val.medium)}</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_UserSettings_profileInputCell">
|
<div className="mx_UserSettings_profileInputCell">
|
||||||
<input type="text" key={val.address} id={id} value={val.address} disabled />
|
<input type="text" key={val.address} id={id}
|
||||||
|
value={this.presentableTextForThreepid(val)} disabled
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_UserSettings_threepidButton mx_filterFlipColor">
|
<div className="mx_UserSettings_threepidButton mx_filterFlipColor">
|
||||||
<img src="img/cancel-small.svg" width="14" height="14" alt="Remove" onClick={this.onRemoveThreepidClicked.bind(this, val)} />
|
<img src="img/cancel-small.svg" width="14" height="14" alt="Remove" onClick={this.onRemoveThreepidClicked.bind(this, val)} />
|
||||||
|
|
Loading…
Reference in New Issue