From b979063ae7d7cc21f0d2ef1cd9553f1a1c5b7c75 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Thu, 22 Jun 2017 09:22:10 +1200 Subject: [PATCH] Current track artwork triggers kiosk --- src/js/components/PlaybackControls.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/js/components/PlaybackControls.js b/src/js/components/PlaybackControls.js index f526742e..aa5d0fae 100755 --- a/src/js/components/PlaybackControls.js +++ b/src/js/components/PlaybackControls.js @@ -11,6 +11,7 @@ import Dater from './Dater' import ArtistSentence from './ArtistSentence' import Thumbnail from './Thumbnail' +import * as uiActions from '../services/ui/actions' import * as mopidyActions from '../services/mopidy/actions' class PlaybackControls extends React.Component{ @@ -51,6 +52,11 @@ class PlaybackControls extends React.Component{ return button; } + handleThumbnailClick(e){ + e.preventDefault(); + this.props.uiActions.openModal('kiosk_mode') + } + render(){ var images = [] if (this.props.current_track && this.props.current_track.album && this.props.current_track.album.images){ @@ -61,7 +67,9 @@ class PlaybackControls extends React.Component{
- +
this.handleThumbnailClick(e)}> + +
{ this.props.current_track ? this.props.current_track.name : - }
@@ -125,6 +133,7 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = (dispatch) => { return { + uiActions: bindActionCreators(uiActions, dispatch), mopidyActions: bindActionCreators(mopidyActions, dispatch) } }