mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(contacts/nui | calling/client|server): getName | close modal on add | show dail history
This commit is contained in:
1 parent
0f10eac796
commit
89ea248d32
9 files changed
+72
-43
No files matched your search
@@ -31,7 +31,7 @@ export const AddContactModal = () => {
|
||||
number,
|
||||
avatar,
|
||||
});
|
||||
console.log(name, number, avatar);
|
||||
setShowModal(false)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -56,13 +56,14 @@ export const ContactList = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const filteredRegEx = new RegExp(filteredContacts, "gi")
|
||||
|
||||
return (
|
||||
<List>
|
||||
{contacts.contacts
|
||||
.filter(
|
||||
(contact) =>
|
||||
contact.display.includes(filteredContacts.toLowerCase()) ||
|
||||
contact.number.includes(filteredContacts.toLowerCase())
|
||||
contact.display.match(filteredRegEx) || contact.number.match(filteredRegEx)
|
||||
)
|
||||
.map((contact) => (
|
||||
<>
|
||||
|
||||
@@ -68,15 +68,9 @@ const useStyles = makeStyles((theme: Theme) =>
|
||||
|
||||
export const SearchContacts = () => {
|
||||
const { setFilteredContacts } = useFilteredContacts();
|
||||
|
||||
const classes = useStyles();
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleChange = (e) => {
|
||||
setFilteredContacts(e.target.value);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={classes.bg}>
|
||||
<div className={classes.search}>
|
||||
@@ -84,13 +78,13 @@ export const SearchContacts = () => {
|
||||
<SearchIcon style={{ color: '#fff' }} />
|
||||
</div>
|
||||
<InputBase
|
||||
onChange={handleChange}
|
||||
onChange={e => setFilteredContacts(e.target.value)}
|
||||
placeholder={t('APPS_CONTACT_PLACEHOLDER_SEARCH_CONTACTS')}
|
||||
classes={{
|
||||
root: classes.inputRoot,
|
||||
input: classes.inputInput,
|
||||
}}
|
||||
inputProps={{ 'aria-label': 'search' }}
|
||||
inputProps={{ 'aria-label': 'search', 'autoFocus': true }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user