phone number editing controls are functional
This commit is contained in:
@@ -99,3 +99,12 @@ export function letterTileColorId(userId) {
|
||||
export function idToColorClass(id, light, fg) {
|
||||
return (light ? 'lt-' : 'dk-') + (fg ? 'fg-' : 'bg-') + letterTileColorId(id);
|
||||
}
|
||||
|
||||
// Takes ISO Alpha-2 country code, like 'US' and converts it to a flag emoji.
|
||||
export function flagEmoji(countryCode) {
|
||||
const codePoints = countryCode
|
||||
.toUpperCase()
|
||||
.split('')
|
||||
.map(char => 0x1F1A5 + char.charCodeAt());
|
||||
return String.fromCodePoint(...codePoints);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class SearchContacts extends React.PureComponent {
|
||||
|
||||
handleSearch(e) {
|
||||
e.preventDefault();
|
||||
var query = this.state.search.trim();
|
||||
const query = this.state.search.trim();
|
||||
this.setState({edited: (query.length > 0)});
|
||||
this.props.onSearchContacts(query.length > 0 ? query : Tinode.DEL_CHAR);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
import InPlaceEdit from './in-place-edit.jsx';
|
||||
|
||||
import { NO_ACCESS_MODE } from '../config.js';
|
||||
|
||||
const messages = defineMessages({
|
||||
clear_messages: {
|
||||
id: 'action_clear_messages',
|
||||
|
||||
Reference in New Issue
Block a user