|
|
@ -10,6 +10,7 @@ import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection';
|
|
|
|
import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator';
|
|
|
|
import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator';
|
|
|
|
import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton';
|
|
|
|
import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton';
|
|
|
|
import FilterMenu from 'Components/Menu/FilterMenu';
|
|
|
|
import FilterMenu from 'Components/Menu/FilterMenu';
|
|
|
|
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import NoMovie from 'Movie/NoMovie';
|
|
|
|
import NoMovie from 'Movie/NoMovie';
|
|
|
|
import CalendarLinkModal from './iCal/CalendarLinkModal';
|
|
|
|
import CalendarLinkModal from './iCal/CalendarLinkModal';
|
|
|
|
import CalendarOptionsModal from './Options/CalendarOptionsModal';
|
|
|
|
import CalendarOptionsModal from './Options/CalendarOptionsModal';
|
|
|
@ -78,6 +79,8 @@ class CalendarPage extends Component {
|
|
|
|
filters,
|
|
|
|
filters,
|
|
|
|
hasMovie,
|
|
|
|
hasMovie,
|
|
|
|
movieError,
|
|
|
|
movieError,
|
|
|
|
|
|
|
|
movieIsFetching,
|
|
|
|
|
|
|
|
movieIsPopulated,
|
|
|
|
missingMovieIds,
|
|
|
|
missingMovieIds,
|
|
|
|
isRssSyncExecuting,
|
|
|
|
isRssSyncExecuting,
|
|
|
|
isSearchingForMissing,
|
|
|
|
isSearchingForMissing,
|
|
|
@ -92,7 +95,6 @@ class CalendarPage extends Component {
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
const isMeasured = this.state.width > 0;
|
|
|
|
const isMeasured = this.state.width > 0;
|
|
|
|
const PageComponent = hasMovie ? CalendarConnector : NoMovie;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<PageContent title="Calendar">
|
|
|
|
<PageContent title="Calendar">
|
|
|
@ -144,6 +146,11 @@ class CalendarPage extends Component {
|
|
|
|
className={styles.calendarPageBody}
|
|
|
|
className={styles.calendarPageBody}
|
|
|
|
innerClassName={styles.calendarInnerPageBody}
|
|
|
|
innerClassName={styles.calendarInnerPageBody}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
movieIsFetching && !movieIsPopulated &&
|
|
|
|
|
|
|
|
<LoadingIndicator />
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
movieError &&
|
|
|
|
movieError &&
|
|
|
|
<div className={styles.errorMessage}>
|
|
|
|
<div className={styles.errorMessage}>
|
|
|
@ -152,14 +159,14 @@ class CalendarPage extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
!movieError &&
|
|
|
|
!movieError && movieIsPopulated && hasMovie &&
|
|
|
|
<Measure
|
|
|
|
<Measure
|
|
|
|
whitelist={['width']}
|
|
|
|
whitelist={['width']}
|
|
|
|
onMeasure={this.onMeasure}
|
|
|
|
onMeasure={this.onMeasure}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isMeasured ?
|
|
|
|
isMeasured ?
|
|
|
|
<PageComponent
|
|
|
|
<CalendarConnector
|
|
|
|
useCurrentPage={useCurrentPage}
|
|
|
|
useCurrentPage={useCurrentPage}
|
|
|
|
/> :
|
|
|
|
/> :
|
|
|
|
<div />
|
|
|
|
<div />
|
|
|
@ -167,6 +174,11 @@ class CalendarPage extends Component {
|
|
|
|
</Measure>
|
|
|
|
</Measure>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
!movieError && movieIsPopulated && !hasMovie &&
|
|
|
|
|
|
|
|
<NoMovie />
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
hasMovie && !movieError &&
|
|
|
|
hasMovie && !movieError &&
|
|
|
|
<LegendConnector />
|
|
|
|
<LegendConnector />
|
|
|
@ -192,6 +204,8 @@ CalendarPage.propTypes = {
|
|
|
|
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
|
|
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
|
|
hasMovie: PropTypes.bool.isRequired,
|
|
|
|
hasMovie: PropTypes.bool.isRequired,
|
|
|
|
movieError: PropTypes.object,
|
|
|
|
movieError: PropTypes.object,
|
|
|
|
|
|
|
|
movieIsFetching: PropTypes.bool.isRequired,
|
|
|
|
|
|
|
|
movieIsPopulated: PropTypes.bool.isRequired,
|
|
|
|
missingMovieIds: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
|
|
missingMovieIds: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
|
|
isRssSyncExecuting: PropTypes.bool.isRequired,
|
|
|
|
isRssSyncExecuting: PropTypes.bool.isRequired,
|
|
|
|
isSearchingForMissing: PropTypes.bool.isRequired,
|
|
|
|
isSearchingForMissing: PropTypes.bool.isRequired,
|
|
|
|