mirror of
https://github.com/funamitech/mastodon
synced 2024-11-25 15:46:44 +09:00
e19eefe219
* Redesign the landing page, mount public timeline on it * Adjust the standalone mounted component to the lacking of router * Adjust auth layout pages to new design * Fix tests * Standalone public timeline polling every 5 seconds * Remove now obsolete translations * Add responsive design for new landing page * Address reviews * Add floating clouds behind frontpage form * Use access token from public page when available * Fix mentions and hashtags links, cursor on status content in standalone mode * Add footer link to source code * Fix errors on pages that don't embed the component, use classnames * Fix tests * Change anonymous autoPlayGif default to false * When gif autoplay is disabled, hover to play * Add option to hide the timeline preview * Slightly improve alt layout * Add elephant friend to new frontpage * Display "back to mastodon" in place of "login" when logged in on frontpage * Change polling time to 3s
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
import PropTypes from 'prop-types';
|
|
import configureStore from '../store/configureStore';
|
|
import { hydrateStore } from '../actions/store';
|
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
|
import { getLocale } from '../locales';
|
|
import PublicTimeline from '../features/standalone/public_timeline';
|
|
|
|
const { localeData, messages } = getLocale();
|
|
addLocaleData(localeData);
|
|
|
|
const store = configureStore();
|
|
const initialStateContainer = document.getElementById('initial-state');
|
|
|
|
if (initialStateContainer !== null) {
|
|
const initialState = JSON.parse(initialStateContainer.textContent);
|
|
store.dispatch(hydrateStore(initialState));
|
|
}
|
|
|
|
export default class TimelineContainer extends React.PureComponent {
|
|
|
|
static propTypes = {
|
|
locale: PropTypes.string.isRequired,
|
|
};
|
|
|
|
render () {
|
|
const { locale } = this.props;
|
|
|
|
return (
|
|
<IntlProvider locale={locale} messages={messages}>
|
|
<Provider store={store}>
|
|
<PublicTimeline />
|
|
</Provider>
|
|
</IntlProvider>
|
|
);
|
|
}
|
|
|
|
}
|