phone number editing controls are functional

This commit is contained in:
or-else
2023-01-22 18:57:19 -08:00
parent b766e827c9
commit b0bf93a4d9
13 changed files with 724 additions and 636 deletions
+9
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
-4
View File
@@ -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',