diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.css b/frontend/src/Calendar/Agenda/AgendaEvent.css index cffaf1eba..2b39f677b 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.css +++ b/frontend/src/Calendar/Agenda/AgendaEvent.css @@ -10,6 +10,10 @@ } } +.link { + composes: link from '~Calendar/Events/CalendarEvent.css'; +} + .eventWrapper { display: flex; flex: 1 0 1px; @@ -30,7 +34,8 @@ border: none !important; } -.movieTitle { +.movieTitle, +.genres { @add-mixin truncate; flex: 0 1 300px; diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.js b/frontend/src/Calendar/Agenda/AgendaEvent.js index f93032efb..97c9ab7cc 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.js +++ b/frontend/src/Calendar/Agenda/AgendaEvent.js @@ -7,7 +7,6 @@ import getStatusStyle from 'Calendar/getStatusStyle'; import Icon from 'Components/Icon'; import Link from 'Components/Link/Link'; import { icons, kinds } from 'Helpers/Props'; -import MovieTitleLink from 'Movie/MovieTitleLink'; import styles from './AgendaEvent.css'; class AgendaEvent extends Component { @@ -41,6 +40,7 @@ class AgendaEvent extends Component { movieFile, title, titleSlug, + genres, isAvailable, inCinemas, monitored, @@ -48,6 +48,7 @@ class AgendaEvent extends Component { grabbed, queueItem, showDate, + showMovieInformation, showCutoffUnmetIcon, longDateFormat, colorImpairedMode @@ -57,13 +58,17 @@ class AgendaEvent extends Component { const downloading = !!(queueItem || grabbed); const isMonitored = monitored; const statusStyle = getStatusStyle(hasFile, downloading, isAvailable, isMonitored); + const joinedGenres = genres.slice(0, 2).join(', '); + const link = `/movie/${titleSlug}`; return (
{ @@ -80,12 +85,16 @@ class AgendaEvent extends Component { )} >
- + {title}
+ { + showMovieInformation && +
+ {joinedGenres} +
+ } + { !!queueItem && @@ -127,6 +136,7 @@ AgendaEvent.propTypes = { movieFile: PropTypes.object, title: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, + genres: PropTypes.arrayOf(PropTypes.string).isRequired, isAvailable: PropTypes.bool.isRequired, inCinemas: PropTypes.string, monitored: PropTypes.bool.isRequired, @@ -134,10 +144,15 @@ AgendaEvent.propTypes = { grabbed: PropTypes.bool, queueItem: PropTypes.object, showDate: PropTypes.bool.isRequired, + showMovieInformation: PropTypes.bool.isRequired, showCutoffUnmetIcon: PropTypes.bool.isRequired, timeFormat: PropTypes.string.isRequired, longDateFormat: PropTypes.string.isRequired, colorImpairedMode: PropTypes.bool.isRequired }; +AgendaEvent.defaultProps = { + genres: [] +}; + export default AgendaEvent;