Middle Header: Various fixes for adding contact (#1787)

This commit is contained in:
Alexander Zinchuk 2022-03-25 13:15:00 +01:00
parent 1d797bc3ba
commit a6a7f6d84f
3 changed files with 18 additions and 8 deletions

View File

@ -6,9 +6,17 @@
&__new-contact {
display: flex;
@media (max-width: 500px) {
flex-direction: column;
}
&-fieldset {
flex: 1;
margin-inline-start: 1rem;
@media (max-width: 500px) {
margin-inline-start: 0;
margin-top: 1rem;
}
}
}

View File

@ -151,19 +151,12 @@ const ChatReportPanel: FC<OwnProps & StateProps> = ({
title={lang('BlockUserTitle', user ? getUserFirstOrLastName(user) : getChatTitle(lang, chat!))}
text={user
? lang('UserInfo.BlockConfirmationTitle', getUserFullName(user))
: lang('Chat.Confirm.ReportSpam.Group')}
: lang('Chat.Confirm.ReportSpam.Channel')}
isButtonsInOneRow
confirmIsDestructive
confirmLabel={lang('Block')}
confirmHandler={user ? handleConfirmBlock : handleChatReportSpam}
>
{user && canReportSpam && (
<Checkbox
label={lang('DeleteReportSpam')}
checked={shouldReportSpam}
onCheck={setShouldReportSpam}
/>
)}
{user && (
<Checkbox
label={lang('DeleteThisChat')}
@ -171,6 +164,13 @@ const ChatReportPanel: FC<OwnProps & StateProps> = ({
onCheck={setShouldDeleteChat}
/>
)}
{user && canReportSpam && (
<Checkbox
label={lang('ReportChat')}
checked={shouldReportSpam}
onCheck={setShouldReportSpam}
/>
)}
</ConfirmDialog>
</div>
);

View File

@ -198,6 +198,8 @@ async function updateContact(
global = getGlobal();
if (result) {
getActions().loadChatSettings({ chatId: userId });
setGlobal(updateUser(
global,
user.id,