Middle Header: Various fixes for adding contact (#1787)
This commit is contained in:
parent
1d797bc3ba
commit
a6a7f6d84f
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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>
|
||||
);
|
||||
|
||||
@ -198,6 +198,8 @@ async function updateContact(
|
||||
|
||||
global = getGlobal();
|
||||
if (result) {
|
||||
getActions().loadChatSettings({ chatId: userId });
|
||||
|
||||
setGlobal(updateUser(
|
||||
global,
|
||||
user.id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user