diff --git a/src/js/components/Notifications.js b/src/js/components/Notifications.js
index 7705514f..b4d46782 100755
--- a/src/js/components/Notifications.js
+++ b/src/js/components/Notifications.js
@@ -19,12 +19,20 @@ class Notifications extends React.Component{
{
this.props.notifications.map( notification => {
- return (
-
- this.props.actions.removeNotification(notification.id) } />
- { notification.content }
-
- )
+ if (notification.is_shortcut){
+ return (
+
+
+
+ )
+ } else {
+ return (
+
+ this.props.actions.removeNotification(notification.id) } />
+ { notification.content }
+
+ )
+ }
})
}
diff --git a/src/js/services/ui/actions.js b/src/js/services/ui/actions.js
index 3672f38f..d7aed541 100755
--- a/src/js/services/ui/actions.js
+++ b/src/js/services/ui/actions.js
@@ -222,13 +222,14 @@ export function createBrowserNotification( data ){
}
}
-export function createNotification( content, type = 'default' ){
+export function createNotification(content, type = 'default', is_shortcut = false){
return {
type: 'CREATE_NOTIFICATION',
notification: {
id: helpers.generateGuid(),
type: type,
- content: content
+ content: content,
+ is_shortcut: is_shortcut
}
}
}
diff --git a/src/js/views/App.js b/src/js/views/App.js
index 72d931d5..01b61921 100755
--- a/src/js/views/App.js
+++ b/src/js/views/App.js
@@ -82,7 +82,7 @@ class App extends React.Component{
shouldTriggerShortcut(e){
var ignoreNodes = ['INPUT', 'TEXTAREA'];
- var keyCodes = [32,27];
+ var keyCodes = [32,27,191];
if( ignoreNodes.indexOf(e.target.nodeName) > -1 ){
return false;
@@ -104,19 +104,31 @@ class App extends React.Component{
switch(e.keyCode){
case 32: // spacebar
- if( this.props.play_state == 'playing' ){
- this.props.mopidyActions.pause();
+ if (this.props.play_state == 'playing'){
+ this.props.mopidyActions.pause()
+ this.props.uiActions.createNotification(null, 'pause', true)
}else{
- this.props.mopidyActions.play();
+ this.props.mopidyActions.play()
+ this.props.uiActions.createNotification(null, 'play', true)
}
- break;
+ break;
case 27: // esc
- if( this.props.dragger && this.props.dragger.dragging ){
- this.props.uiActions.dragCancel();
+ if (this.props.dragger && this.props.dragger.dragging){
+ this.props.uiActions.dragCancel()
}
- if( this.props.modal ){
- this.props.uiActions.closeModal();
+ if (this.props.modal){
+ this.props.uiActions.closeModal()
+ }
+ break;
+
+ case 191: // "/"
+ if (e.ctrlKey){
+ if (this.props.modal){
+ this.props.uiActions.closeModal()
+ } else {
+ this.props.uiActions.openModal('kiosk_mode')
+ }
}
break;
}
diff --git a/src/js/views/Playlist.js b/src/js/views/Playlist.js
index 66cecaf1..96bfc95b 100755
--- a/src/js/views/Playlist.js
+++ b/src/js/views/Playlist.js
@@ -70,7 +70,8 @@ class Playlist extends React.Component{
play(){
ReactGA.event({ category: 'Playlist', action: 'Play', label: this.props.playlist.uri })
- this.props.mopidyActions.playURIs([this.props.playlist.uri], this.props.params.uri)
+ var track_uris = helpers.asURIs(this.props.playlist.tracks)
+ this.props.mopidyActions.playURIs(track_uris, this.props.params.uri)
}
follow(){
diff --git a/src/js/views/Queue.js b/src/js/views/Queue.js
index 05021eae..b28302cd 100755
--- a/src/js/views/Queue.js
+++ b/src/js/views/Queue.js
@@ -63,10 +63,6 @@ class Queue extends React.Component{
Radio
-