mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-05 03:19:04 +01:00
2bbf987a0a
* Redesign video player * Use new video player on static public pages too * Use media gallery component on static public pages too * Pause video when hiding it * Full-screen sizing on WebKit * Add aria labels to video player buttons * Display link card on public status page * Fix fullscreen from modal sizing issue * Remove contain: strict property to fix fullscreen from columns
34 lines
845 B
JavaScript
34 lines
845 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
|
import { getLocale } from '../locales';
|
|
import MediaGallery from '../components/media_gallery';
|
|
import { fromJS } from 'immutable';
|
|
|
|
const { localeData, messages } = getLocale();
|
|
addLocaleData(localeData);
|
|
|
|
export default class MediaGalleryContainer extends React.PureComponent {
|
|
|
|
static propTypes = {
|
|
locale: PropTypes.string.isRequired,
|
|
media: PropTypes.array.isRequired,
|
|
};
|
|
|
|
handleOpenMedia = () => {}
|
|
|
|
render () {
|
|
const { locale, media, ...props } = this.props;
|
|
|
|
return (
|
|
<IntlProvider locale={locale} messages={messages}>
|
|
<MediaGallery
|
|
{...props}
|
|
media={fromJS(media)}
|
|
onOpenMedia={this.handleOpenMedia}
|
|
/>
|
|
</IntlProvider>
|
|
);
|
|
}
|
|
|
|
}
|