Chat Report Pane: Adjust checkbox styles (#5588)
This commit is contained in:
parent
0fb3c37904
commit
1ad635c903
@ -67,7 +67,7 @@ const SettingsPasswordForm: FC<OwnProps> = ({
|
|||||||
<PasswordMonkey isBig isPasswordVisible={shouldShowPassword} />
|
<PasswordMonkey isBig isPasswordVisible={shouldShowPassword} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<PasswordForm
|
<PasswordForm
|
||||||
error={validationError || error}
|
error={validationError || error}
|
||||||
hint={hint}
|
hint={hint}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ const SettingsPasscodeCongratulations: FC<OwnProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<Button onClick={fullReset}>{lang('Back')}</Button>
|
<Button onClick={fullReset}>{lang('Back')}</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -41,7 +41,7 @@ const SettingsPasscodeEnabled: FC<OwnProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<ListItem
|
<ListItem
|
||||||
icon="edit"
|
icon="edit"
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
|
|||||||
@ -44,7 +44,7 @@ const SettingsPasscodeStart: FC<OwnProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<Button onClick={onStart}>{lang('EnablePasscode')}</Button>
|
<Button onClick={onStart}>{lang('EnablePasscode')}</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -46,7 +46,7 @@ const SettingsTwoFaCongratulations: FC<OwnProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<Button onClick={handleClick}>{lang('TwoStepVerificationPasswordReturnSettings')}</Button>
|
<Button onClick={handleClick}>{lang('TwoStepVerificationPasswordReturnSettings')}</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -91,7 +91,7 @@ const SettingsTwoFaEmailCode: FC<OwnProps & StateProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<InputText
|
<InputText
|
||||||
value={value}
|
value={value}
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
|
|||||||
@ -45,7 +45,7 @@ const SettingsTwoFaEnabled: FC<OwnProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<ListItem
|
<ListItem
|
||||||
icon="edit"
|
icon="edit"
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
|
|||||||
@ -110,7 +110,7 @@ const SettingsTwoFaSkippableForm: FC<OwnProps & StateProps> = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-item pt-0">
|
<div className="settings-item pt-2">
|
||||||
<form action="" onSubmit={handleSubmit}>
|
<form action="" onSubmit={handleSubmit}>
|
||||||
<InputText
|
<InputText
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
|
|||||||
@ -17,4 +17,8 @@
|
|||||||
flex: 1 1 50%;
|
flex: 1 1 50%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--Checkbox {
|
||||||
|
margin-top: -1rem !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo, useState } from '../../../lib/teact/teact';
|
import React, { memo, useEffect, useState } from '../../../lib/teact/teact';
|
||||||
import { getActions, withGlobal } from '../../../global';
|
import { getActions, withGlobal } from '../../../global';
|
||||||
|
|
||||||
import type { ApiPeer } from '../../../api/types';
|
import type { ApiPeer } from '../../../api/types';
|
||||||
@ -114,6 +114,12 @@ const ChatReportPane: FC<OwnProps & StateProps> = ({
|
|||||||
|
|
||||||
const isRendering = Boolean(hasAnyButton && peer);
|
const isRendering = Boolean(hasAnyButton && peer);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isRendering) {
|
||||||
|
closeBlockUserModal();
|
||||||
|
}
|
||||||
|
}, [isRendering]);
|
||||||
|
|
||||||
const { ref, shouldRender } = useHeaderPane({
|
const { ref, shouldRender } = useHeaderPane({
|
||||||
isOpen: isRendering,
|
isOpen: isRendering,
|
||||||
onStateChange: onPaneStateChange,
|
onStateChange: onPaneStateChange,
|
||||||
@ -193,7 +199,7 @@ const ChatReportPane: FC<OwnProps & StateProps> = ({
|
|||||||
)}
|
)}
|
||||||
{user && canReportSpam && (
|
{user && canReportSpam && (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className="dialog-checkbox"
|
className="ChatReportPane--Checkbox dialog-checkbox"
|
||||||
label={lang('ReportChat')}
|
label={lang('ReportChat')}
|
||||||
checked={shouldReportSpam}
|
checked={shouldReportSpam}
|
||||||
onCheck={setShouldReportSpam}
|
onCheck={setShouldReportSpam}
|
||||||
|
|||||||
@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
.modal-header,
|
.modal-header,
|
||||||
%modal-header {
|
%modal-header {
|
||||||
padding: 1.3125rem 1.3125rem 0;
|
padding: 1.3125rem 1.375rem 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user