From f66dd644e228592cb72e03b44cb63df1ea27e5f2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 10 Nov 2020 15:25:09 +0100 Subject: new curtain styles --- .../components.fullscreen/fullscreen.utility.js | 42 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.utility.js') diff --git a/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.utility.js b/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.utility.js index 64b4e48..3282db9 100644 --- a/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.utility.js +++ b/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.utility.js @@ -1,5 +1,7 @@ import React from 'react' +import { EPILEPSY_WARNING, ROMAN_NUMERALS } from 'app/constants' + export const FullscreenCurtain = ({ element, transitionDuration }) => { // console.log(element, isEntering) const { color } = element @@ -8,14 +10,40 @@ export const FullscreenCurtain = ({ element, transitionDuration }) => { color: color.textColor, transitionDuration, } + let texts = [] + console.log(element) + switch (element.settings.curtain_style) { + case 'section_heading': + texts.push(( +
{ROMAN_NUMERALS[element.section.index]}{'.'}
+ )) + texts.push(( +
+ )) + break + + case 'video_title': + texts.push(( +
+ )) + break + + default: + texts.push(( +
+ )) + break + } + if (element.settings.flashing_light_warning) { + texts.push(( +
{EPILEPSY_WARNING}
+ )) + } return ( -
- {element.annotation.settings.curtain_text && ( - - )} +
+
+ {texts} +
) } -- cgit v1.2.3-70-g09d2