Merge remote-tracking branch 'parent/main' into upstream-20240123
This commit is contained in:
commit
50ae2d9439
320 changed files with 2587 additions and 2817 deletions
|
@ -4,6 +4,7 @@ import { PureComponent } from 'react';
|
|||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import Base from 'mastodon/components/modal_root';
|
||||
import { AltTextModal } from 'mastodon/features/alt_text_modal';
|
||||
import {
|
||||
MuteModal,
|
||||
BlockModal,
|
||||
|
@ -43,7 +44,6 @@ import {
|
|||
ConfirmLogOutModal,
|
||||
ConfirmFollowToListModal,
|
||||
} from './confirmation_modals';
|
||||
import FocalPointModal from './focal_point_modal';
|
||||
import ImageModal from './image_modal';
|
||||
import MediaModal from './media_modal';
|
||||
import { ModalPlaceholder } from './modal_placeholder';
|
||||
|
@ -73,7 +73,7 @@ export const MODAL_COMPONENTS = {
|
|||
'REPORT': ReportModal,
|
||||
'ACTIONS': () => Promise.resolve({ default: ActionsModal }),
|
||||
'EMBED': EmbedModal,
|
||||
'FOCAL_POINT': () => Promise.resolve({ default: FocalPointModal }),
|
||||
'FOCAL_POINT': () => Promise.resolve({ default: AltTextModal }),
|
||||
'LIST_ADDER': ListAdder,
|
||||
'ANTENNA_ADDER': AntennaAdder,
|
||||
'CIRCLE_ADDER': CircleAdder,
|
||||
|
@ -151,8 +151,7 @@ export default class ModalRoot extends PureComponent {
|
|||
<>
|
||||
<BundleContainer fetchComponent={MODAL_COMPONENTS[type]} loading={this.renderLoading} error={this.renderError} renderDelay={200}>
|
||||
{(SpecificComponent) => {
|
||||
const ref = typeof SpecificComponent !== 'function' ? this.setModalRef : undefined;
|
||||
return <SpecificComponent {...props} onChangeBackgroundColor={this.setBackgroundColor} onClose={this.handleClose} ref={ref} />;
|
||||
return <SpecificComponent {...props} onChangeBackgroundColor={this.setBackgroundColor} onClose={this.handleClose} ref={this.setModalRef} />;
|
||||
}}
|
||||
</BundleContainer>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue