From 0f4d8d0d9601f6f2794c28e67ef8b0d4aad9fc86 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 24 Jul 2020 22:19:32 +0200 Subject: checklist --- .../views/viewer/checklist/checklist.content.js | 60 ++++++++++++++++++---- 1 file changed, 50 insertions(+), 10 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/checklist/checklist.content.js') diff --git a/animism-align/frontend/app/views/viewer/checklist/checklist.content.js b/animism-align/frontend/app/views/viewer/checklist/checklist.content.js index ae72adf..3eadaca 100644 --- a/animism-align/frontend/app/views/viewer/checklist/checklist.content.js +++ b/animism-align/frontend/app/views/viewer/checklist/checklist.content.js @@ -2,21 +2,61 @@ import React, { Component } from 'react' import { connect } from 'react-redux' import actions from 'app/actions' +import { ROMAN_NUMERALS } from 'app/constants' +import { pad } from 'app/utils' +import { thumbnailURL } from 'app/views/align/align.util' +import { PlayIcon } from '../nav/viewer.icons' class ChecklistContent extends Component { render() { const { sections, currentSection } = this.props return ( -
-
-
- {sections.map(section => { - if (currentSection !== "all" || section.index !== currentSection) return - return ( -
- ) - })} -
+
+
+ {sections.map(section => { + if ((currentSection !== "all" && section.index !== currentSection) || !section.media.length) { + return
+ } + return ( +
+ {section.media.map((media, i) => ( +
+
+ {pad(section.mediaIndex + i + 1, 2)} +
+
+ {ROMAN_NUMERALS[section.index]} +
+ {section.title} +
+
+ {media.author} +
+ {media.pre_title && (media.pre_title + ' ')} + {media.title} + {media.post_title && (' ' + media.post_title)} +
+ {media.year} +
+ {media.medium} + {media.settings.duration && (', ' + media.settings.duration)} +
+
+
+
+ {media.title} + {media.type === 'video' && + + {PlayIcon} + + } +
+
+
+ ))} +
+ ) + })}
) -- cgit v1.2.3-70-g09d2