MM-57841 - Updating post delete modal (#26907)

Этот коммит содержится в:
Asaad Mahmood
2024-05-01 11:23:23 -07:00
коммит произвёл GitHub
родитель 4db2ae5753
Коммит 6028cbe4e2
2 изменённых файлов: 21 добавлений и 23 удалений

Просмотреть файл

@@ -72,8 +72,6 @@ exports[`components/delete_post_modal should match snapshot for delete_post_moda
} }
} }
/> />
<br />
<br />
</ModalBody> </ModalBody>
<ModalFooter <ModalFooter
bsClass="modal-footer" bsClass="modal-footer"
@@ -177,17 +175,19 @@ exports[`components/delete_post_modal should match snapshot for delete_post_moda
} }
} }
/> />
<br /> <div
<br /> className="mt-2"
<MemoizedFormattedMessage >
defaultMessage="This post has {count, number} {count, plural, one {comment} other {comments}} on it." <MemoizedFormattedMessage
id="delete_post.warning" defaultMessage="This post has {count, number} {count, plural, one {comment} other {comments}} on it."
values={ id="delete_post.warning"
Object { values={
"count": 1, Object {
"count": 1,
}
} }
} />
/> </div>
</ModalBody> </ModalBody>
<ModalFooter <ModalFooter
bsClass="modal-footer" bsClass="modal-footer"
@@ -291,8 +291,6 @@ exports[`components/delete_post_modal should match snapshot for post with 1 comm
} }
} }
/> />
<br />
<br />
</ModalBody> </ModalBody>
<ModalFooter <ModalFooter
bsClass="modal-footer" bsClass="modal-footer"

Просмотреть файл

@@ -106,13 +106,15 @@ export default class DeletePostModal extends React.PureComponent<Props, State> {
if (this.props.commentCount > 0 && this.props.post.root_id === '') { if (this.props.commentCount > 0 && this.props.post.root_id === '') {
commentWarning = ( commentWarning = (
<FormattedMessage <div className='mt-2'>
id='delete_post.warning' <FormattedMessage
defaultMessage='This post has {count, number} {count, plural, one {comment} other {comments}} on it.' id='delete_post.warning'
values={{ defaultMessage='This post has {count, number} {count, plural, one {comment} other {comments}} on it.'
count: this.props.commentCount, values={{
}} count: this.props.commentCount,
/> }}
/>
</div>
); );
} }
@@ -161,8 +163,6 @@ export default class DeletePostModal extends React.PureComponent<Props, State> {
term: (postTerm), term: (postTerm),
}} }}
/> />
<br/>
<br/>
{commentWarning} {commentWarning}
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>