Merge commit '7628d411e29ad6b52cd8541e517241f9369d1bd7' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2026-07-15 18:56:24 +02:00
commit 1de57433da
43 files changed
+522 -178

No files matched your search

@@ -72,7 +72,7 @@ const DirectTimeline = ({ columnId, multiColumn }) => {
scrollKey={`direct_timeline-${columnId}`}
emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any private mentions yet. When you send or receive one, it will show up here." />}
bindToDocument={!multiColumn}
prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='https://docs.joinmastodon.org/user/posting/#private' rel='noreferrer' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
alwaysPrepend
/>
@@ -52,13 +52,18 @@ export const ConfirmationModal: React.FC<
noCloseOnConfirm = false,
noFocusButton = false,
}) => {
const handleClick = useCallback(() => {
if (!noCloseOnConfirm) {
onClose();
}
const handleSubmit = useCallback<React.SubmitEventHandler<HTMLFormElement>>(
(e) => {
e.preventDefault();
void onConfirm();
}, [onClose, onConfirm, noCloseOnConfirm]);
if (!noCloseOnConfirm) {
onClose();
}
void onConfirm();
},
[onClose, onConfirm, noCloseOnConfirm],
);
const handleSecondary = useCallback(() => {
onClose();
@@ -66,7 +71,7 @@ export const ConfirmationModal: React.FC<
}, [onClose, onSecondary]);
return (
<ModalShell onSubmit={handleClick}>
<ModalShell onSubmit={handleSubmit}>
<ModalShellBody className={className}>
{noFocusButton ? (
<NavigationFocusTarget as='h1' id={titleId}>
@@ -107,7 +112,6 @@ export const ConfirmationModal: React.FC<
{/* eslint-disable jsx-a11y/no-autofocus -- we are in a modal and thus autofocusing is justified */}
<Button
type='submit'
onClick={handleClick}
loading={updating}
disabled={disabled}
autoFocus={!noFocusButton}