Files
Iris/src/js/services/ui/actions.js

69 lines
1.3 KiB
JavaScript
Raw Normal View History

2016-10-27 10:02:12 +13:00
export function showContextMenu( e, context = false, data ){
return {
2016-11-09 15:51:38 +13:00
type: 'SHOW_CONTEXT_MENU',
2016-10-27 10:02:12 +13:00
position_x: e.clientX,
position_y: e.clientY,
context: context,
data: data
}
}
export function hideContextMenu(){
2016-11-09 15:49:25 +13:00
return {
2016-11-09 15:51:38 +13:00
type: 'HIDE_CONTEXT_MENU'
2016-11-09 15:49:25 +13:00
}
}
export function searchStarted(){
2016-10-27 10:02:12 +13:00
return {
2016-11-09 15:49:25 +13:00
type: 'SEARCH_STARTED',
data: {
artists: [],
albums: [],
playlists: [],
tracks: [],
artists_more: false,
albums_more: false,
playlists_more: false,
tracks_more: false
}
2016-10-27 10:02:12 +13:00
}
}
2016-11-01 08:57:28 +13:00
export function lazyLoading( start ){
return {
2016-11-09 15:51:38 +13:00
type: 'LAZY_LOADING',
2016-11-01 08:57:28 +13:00
start: start
}
}
2016-11-10 16:17:10 +13:00
export function dragStart( e, context, victims ){
return {
type: 'DRAG_START',
context: context,
victims: victims,
position_x: e.clientX,
position_y: e.clientY
}
}
export function dragMove( e ){
return {
type: 'DRAG_MOVE',
position_x: e.clientX,
position_y: e.clientY,
}
}
export function dragCancel(){
return { type: 'DRAG_CANCEL' }
}
2016-11-10 16:17:10 +13:00
export function dragEnd(){
return { type: 'DRAG_END' }
}
2016-10-27 10:02:12 +13:00