]> git.localhorst.tv Git - alttp.git/commitdiff
show comment for episode
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 12 Mar 2023 21:33:08 +0000 (22:33 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 12 Mar 2023 21:33:08 +0000 (22:33 +0100)
resources/js/components/episodes/Item.js

index c911bc3b6e1f54e3ff15d09ceb76de4abbccefd0..3545e7734586a1f3006ad761621df9061fb15d10 100644 (file)
@@ -26,7 +26,7 @@ const Item = ({ episode, onAddRestream, onApply, onEditRestream, user }) => {
        const classNames = [
                'episodes-item',
                'd-flex',
        const classNames = [
                'episodes-item',
                'd-flex',
-               'align-items-start',
+               'align-items-stretch',
                'my-3',
                'p-2',
                'border',
                'my-3',
                'p-2',
                'border',
@@ -52,7 +52,7 @@ const Item = ({ episode, onAddRestream, onApply, onEditRestream, user }) => {
                <div className="episode-start me-3 fs-4 text-end">
                        {t('schedule.startTime', { date: new Date(episode.start) })}
                </div>
                <div className="episode-start me-3 fs-4 text-end">
                        {t('schedule.startTime', { date: new Date(episode.start) })}
                </div>
-               <div className="flex-fill">
+               <div className="d-flex flex-column flex-fill">
                        <div className="d-flex align-items-start justify-content-between">
                                <div>
                                        {episode.title ?
                        <div className="d-flex align-items-start justify-content-between">
                                <div>
                                        {episode.title ?
@@ -60,9 +60,9 @@ const Item = ({ episode, onAddRestream, onApply, onEditRestream, user }) => {
                                                        {episode.title}
                                                </div>
                                        : null}
                                                        {episode.title}
                                                </div>
                                        : null}
-                                       {episode.event ?
-                                               <div className="episode-event">
-                                                       {episode.event.title}
+                                       {episode.comment ?
+                                               <div className="episode-comment">
+                                                       {episode.comment}
                                                </div>
                                        : null}
                                </div>
                                                </div>
                                        : null}
                                </div>
@@ -96,7 +96,14 @@ const Item = ({ episode, onAddRestream, onApply, onEditRestream, user }) => {
                        {(episode.crew && episode.crew.length)
                                        || canApplyForEpisode(user, episode, 'commentary')
                                        || canApplyForEpisode(user, episode, 'tracking') ?
                        {(episode.crew && episode.crew.length)
                                        || canApplyForEpisode(user, episode, 'commentary')
                                        || canApplyForEpisode(user, episode, 'tracking') ?
-                               <Crew episode={episode} onApply={onApply} />
+                               <div className="mb-3">
+                                       <Crew episode={episode} onApply={onApply} />
+                               </div>
+                       : null}
+                       {episode.event ?
+                               <div className="episode-event mt-auto">
+                                       {episode.event.title}
+                               </div>
                        : null}
                </div>
        </div>;
                        : null}
                </div>
        </div>;
@@ -106,6 +113,7 @@ Item.propTypes = {
        episode: PropTypes.shape({
                channels: PropTypes.arrayOf(PropTypes.shape({
                })),
        episode: PropTypes.shape({
                channels: PropTypes.arrayOf(PropTypes.shape({
                })),
+               comment: PropTypes.string,
                crew: PropTypes.arrayOf(PropTypes.shape({
                })),
                event: PropTypes.shape({
                crew: PropTypes.arrayOf(PropTypes.shape({
                })),
                event: PropTypes.shape({