Add edit nickname to contact modal for group members
This commit is contained in:
parent
cf02337d6d
commit
2fbbcdf358
6 changed files with 53 additions and 1 deletions
|
@ -25,6 +25,7 @@ import { UserText } from '../UserText';
|
|||
import { Button, ButtonIconType, ButtonVariant } from '../Button';
|
||||
import { isInSystemContacts } from '../../util/isInSystemContacts';
|
||||
import { InContactsIcon } from '../InContactsIcon';
|
||||
import { areNicknamesEnabled } from '../../util/nicknames';
|
||||
|
||||
export type PropsDataType = {
|
||||
areWeASubscriber: boolean;
|
||||
|
@ -43,6 +44,7 @@ export type PropsDataType = {
|
|||
type PropsActionType = {
|
||||
blockConversation: (id: string) => void;
|
||||
hideContactModal: () => void;
|
||||
onOpenEditNicknameAndNoteModal: () => void;
|
||||
onOutgoingAudioCallInConversation: (conversationId: string) => unknown;
|
||||
onOutgoingVideoCallInConversation: (conversationId: string) => unknown;
|
||||
removeMemberFromGroup: (conversationId: string, contactId: string) => void;
|
||||
|
@ -83,6 +85,7 @@ export function ContactModal({
|
|||
i18n,
|
||||
isAdmin,
|
||||
isMember,
|
||||
onOpenEditNicknameAndNoteModal,
|
||||
onOutgoingAudioCallInConversation,
|
||||
onOutgoingVideoCallInConversation,
|
||||
removeMemberFromGroup,
|
||||
|
@ -303,6 +306,19 @@ export function ContactModal({
|
|||
)}
|
||||
<div className="ContactModal__divider" />
|
||||
<div className="ContactModal__button-container">
|
||||
{areNicknamesEnabled() && !contact.isMe && (
|
||||
<button
|
||||
type="button"
|
||||
className="ContactModal__button ContactModal__block"
|
||||
onClick={onOpenEditNicknameAndNoteModal}
|
||||
>
|
||||
<div className="ContactModal__bubble-icon">
|
||||
<div className="ContactModal__nickname__bubble-icon" />
|
||||
</div>
|
||||
<span>{i18n('icu:ContactModal--nickname')}</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{!contact.isMe && (
|
||||
<button
|
||||
type="button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue