Fixed: Entire row Link on Calendar Agenda Page

pull/4848/head
Qstick 4 years ago
parent 3d25b99f63
commit 2d121e9857

@ -10,6 +10,10 @@
} }
} }
.link {
composes: link from '~Calendar/Events/CalendarEvent.css';
}
.eventWrapper { .eventWrapper {
display: flex; display: flex;
flex: 1 0 1px; flex: 1 0 1px;
@ -30,7 +34,8 @@
border: none !important; border: none !important;
} }
.movieTitle { .movieTitle,
.genres {
@add-mixin truncate; @add-mixin truncate;
flex: 0 1 300px; flex: 0 1 300px;

@ -7,7 +7,6 @@ import getStatusStyle from 'Calendar/getStatusStyle';
import Icon from 'Components/Icon'; import Icon from 'Components/Icon';
import Link from 'Components/Link/Link'; import Link from 'Components/Link/Link';
import { icons, kinds } from 'Helpers/Props'; import { icons, kinds } from 'Helpers/Props';
import MovieTitleLink from 'Movie/MovieTitleLink';
import styles from './AgendaEvent.css'; import styles from './AgendaEvent.css';
class AgendaEvent extends Component { class AgendaEvent extends Component {
@ -41,6 +40,7 @@ class AgendaEvent extends Component {
movieFile, movieFile,
title, title,
titleSlug, titleSlug,
genres,
isAvailable, isAvailable,
inCinemas, inCinemas,
monitored, monitored,
@ -48,6 +48,7 @@ class AgendaEvent extends Component {
grabbed, grabbed,
queueItem, queueItem,
showDate, showDate,
showMovieInformation,
showCutoffUnmetIcon, showCutoffUnmetIcon,
longDateFormat, longDateFormat,
colorImpairedMode colorImpairedMode
@ -57,13 +58,17 @@ class AgendaEvent extends Component {
const downloading = !!(queueItem || grabbed); const downloading = !!(queueItem || grabbed);
const isMonitored = monitored; const isMonitored = monitored;
const statusStyle = getStatusStyle(hasFile, downloading, isAvailable, isMonitored); const statusStyle = getStatusStyle(hasFile, downloading, isAvailable, isMonitored);
const joinedGenres = genres.slice(0, 2).join(', ');
const link = `/movie/${titleSlug}`;
return ( return (
<div> <div>
<Link <Link
className={styles.event} className={classNames(
component="div" styles.event,
onPress={this.onPress} styles.link
)}
to={link}
> >
<div className={styles.date}> <div className={styles.date}>
{ {
@ -80,12 +85,16 @@ class AgendaEvent extends Component {
)} )}
> >
<div className={styles.movieTitle}> <div className={styles.movieTitle}>
<MovieTitleLink {title}
titleSlug={titleSlug}
title={title}
/>
</div> </div>
{
showMovieInformation &&
<div className={styles.genres}>
{joinedGenres}
</div>
}
{ {
!!queueItem && !!queueItem &&
<span className={styles.statusIcon}> <span className={styles.statusIcon}>
@ -127,6 +136,7 @@ AgendaEvent.propTypes = {
movieFile: PropTypes.object, movieFile: PropTypes.object,
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,
titleSlug: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired,
genres: PropTypes.arrayOf(PropTypes.string).isRequired,
isAvailable: PropTypes.bool.isRequired, isAvailable: PropTypes.bool.isRequired,
inCinemas: PropTypes.string, inCinemas: PropTypes.string,
monitored: PropTypes.bool.isRequired, monitored: PropTypes.bool.isRequired,
@ -134,10 +144,15 @@ AgendaEvent.propTypes = {
grabbed: PropTypes.bool, grabbed: PropTypes.bool,
queueItem: PropTypes.object, queueItem: PropTypes.object,
showDate: PropTypes.bool.isRequired, showDate: PropTypes.bool.isRequired,
showMovieInformation: PropTypes.bool.isRequired,
showCutoffUnmetIcon: PropTypes.bool.isRequired, showCutoffUnmetIcon: PropTypes.bool.isRequired,
timeFormat: PropTypes.string.isRequired, timeFormat: PropTypes.string.isRequired,
longDateFormat: PropTypes.string.isRequired, longDateFormat: PropTypes.string.isRequired,
colorImpairedMode: PropTypes.bool.isRequired colorImpairedMode: PropTypes.bool.isRequired
}; };
AgendaEvent.defaultProps = {
genres: []
};
export default AgendaEvent; export default AgendaEvent;

Loading…
Cancel
Save