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 { &__new-contact {
display: flex; display: flex;
@media (max-width: 500px) {
flex-direction: column;
}
&-fieldset { &-fieldset {
flex: 1; flex: 1;
margin-inline-start: 1rem; 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!))} title={lang('BlockUserTitle', user ? getUserFirstOrLastName(user) : getChatTitle(lang, chat!))}
text={user text={user
? lang('UserInfo.BlockConfirmationTitle', getUserFullName(user)) ? lang('UserInfo.BlockConfirmationTitle', getUserFullName(user))
: lang('Chat.Confirm.ReportSpam.Group')} : lang('Chat.Confirm.ReportSpam.Channel')}
isButtonsInOneRow isButtonsInOneRow
confirmIsDestructive confirmIsDestructive
confirmLabel={lang('Block')} confirmLabel={lang('Block')}
confirmHandler={user ? handleConfirmBlock : handleChatReportSpam} confirmHandler={user ? handleConfirmBlock : handleChatReportSpam}
> >
{user && canReportSpam && (
<Checkbox
label={lang('DeleteReportSpam')}
checked={shouldReportSpam}
onCheck={setShouldReportSpam}
/>
)}
{user && ( {user && (
<Checkbox <Checkbox
label={lang('DeleteThisChat')} label={lang('DeleteThisChat')}
@ -171,6 +164,13 @@ const ChatReportPanel: FC<OwnProps & StateProps> = ({
onCheck={setShouldDeleteChat} onCheck={setShouldDeleteChat}
/> />
)} )}
{user && canReportSpam && (
<Checkbox
label={lang('ReportChat')}
checked={shouldReportSpam}
onCheck={setShouldReportSpam}
/>
)}
</ConfirmDialog> </ConfirmDialog>
</div> </div>
); );

View File

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