From 7f337ddac9136f088e09194c306b7dfd2c8217c2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 21 Nov 2020 17:29:20 +0100 Subject: close button on fullscreen content --- .../frontend/app/views/viewer/nav/eflux.chrome.js | 39 +++++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/nav/eflux.chrome.js') diff --git a/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js b/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js index f2f02d2..b9fe340 100644 --- a/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js +++ b/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js @@ -19,6 +19,7 @@ class EfluxChrome extends Component { eflux: false, play: false, transcript: false, + close: false, started: false, playMessage: PLAY_MESSAGES.not_started, } @@ -50,7 +51,7 @@ class EfluxChrome extends Component { render() { const { navStyle, navGradient, - playing, transcriptOpen, + playing, transcriptOpen, isFullscreen, growlOpen, growlMessage, atEndOfSection, currentSection } = this.props @@ -75,6 +76,15 @@ class EfluxChrome extends Component { {growlMessage}
+ {isFullscreen && +
this.handleMouseEnter('close')} + onMouseLeave={() => this.handleMouseLeave('close')} + > + {EfluxClose} +
+ } this.handleMouseEnter('play')} onMouseLeave={() => this.handleMouseLeave('play')} @@ -90,14 +100,32 @@ class EfluxChrome extends Component { {TranscriptIcon}
-
+
+ {'Close fullscreen player'} +
+
{'Back to e-flux'}
-
+
{this.state.playMessage}
-
actions.viewer.toggleComponent('transcript')} > {'Read the Transcript'} @@ -116,6 +144,7 @@ const mapStateToProps = state => ({ growlMessage: state.viewer.growlMessage, atEndOfSection: state.viewer.atEndOfSection, currentSection: state.viewer.currentSection, + isFullscreen: state.viewer.isFullscreen, }) export default connect(mapStateToProps)(EfluxChrome) -- cgit v1.2.3-70-g09d2