Auto eslint fix

This commit is contained in:
James Barnsley
2019-09-05 15:36:11 +12:00
parent 4513a0d109
commit e4d53a2d35
126 changed files with 23283 additions and 23573 deletions

View File

@ -1,12 +1,12 @@
import * as helpers from '../../helpers'
import * as helpers from '../../helpers';
export function setWindowTitle(title = null, play_state = null){
return {
type: 'SET_WINDOW_TITLE',
title: title,
play_state: play_state
}
export function setWindowTitle(title = null, play_state = null) {
return {
type: 'SET_WINDOW_TITLE',
title,
play_state,
};
}
/**
@ -14,282 +14,276 @@ export function setWindowTitle(title = null, play_state = null){
* we're pending transition to a new/next track
*
* @param transitioning Boolean
**/
export function setCurrentTrackTransition(current_track_transition){
return {
type: 'SET_CURRENT_TRACK_TRANSITION',
current_track_transition: current_track_transition
}
* */
export function setCurrentTrackTransition(current_track_transition) {
return {
type: 'SET_CURRENT_TRACK_TRANSITION',
current_track_transition,
};
}
export function setSelectedTracks(keys = []){
if (typeof(keys) === 'string'){
keys = [keys]
}
return {
type: 'SET_SELECTED_TRACKS',
keys: keys
}
export function setSelectedTracks(keys = []) {
if (typeof (keys) === 'string') {
keys = [keys];
}
return {
type: 'SET_SELECTED_TRACKS',
keys,
};
}
export function showContextMenu(data){
// Touchend
if (data.e.changedTouches){
data.position_x = data.e.changedTouches[0].clientX;
data.position_y = data.e.changedTouches[0].clientY;
export function showContextMenu(data) {
// Touchend
if (data.e.changedTouches) {
data.position_x = data.e.changedTouches[0].clientX;
data.position_y = data.e.changedTouches[0].clientY;
// Touchstart
} else if (data.e.touches){
data.position_x = data.e.touches[0].clientX;
data.position_y = data.e.touches[0].clientY;
} else if (data.e.touches) {
data.position_x = data.e.touches[0].clientX;
data.position_y = data.e.touches[0].clientY;
// Click/mousedown/mouseup/etc
} else {
data.position_x = data.e.clientX;
data.position_y = data.e.clientY;
}
} else {
data.position_x = data.e.clientX;
data.position_y = data.e.clientY;
}
return {
type: 'SHOW_CONTEXT_MENU',
data: data
}
return {
type: 'SHOW_CONTEXT_MENU',
data,
};
}
export function setSlimMode(slim_mode){
return {
type: 'SET_SLIM_MODE',
slim_mode: slim_mode
}
export function setSlimMode(slim_mode) {
return {
type: 'SET_SLIM_MODE',
slim_mode,
};
}
export function setWindowFocus(window_focus){
return {
type: 'SET_WINDOW_FOCUS',
window_focus: window_focus
}
export function setWindowFocus(window_focus) {
return {
type: 'SET_WINDOW_FOCUS',
window_focus,
};
}
export function hideContextMenu(){
return {
type: 'HIDE_CONTEXT_MENU'
}
export function hideContextMenu() {
return {
type: 'HIDE_CONTEXT_MENU',
};
}
export function removeContextMenu(){
return {
type: 'REMOVE_CONTEXT_MENU'
}
export function removeContextMenu() {
return {
type: 'REMOVE_CONTEXT_MENU',
};
}
export function showTouchContextMenu(data){
return {
type: 'SHOW_TOUCH_CONTEXT_MENU',
data: data
}
export function showTouchContextMenu(data) {
return {
type: 'SHOW_TOUCH_CONTEXT_MENU',
data,
};
}
export function hideTouchContextMenu(){
return {
type: 'HIDE_TOUCH_CONTEXT_MENU'
}
export function hideTouchContextMenu() {
return {
type: 'HIDE_TOUCH_CONTEXT_MENU',
};
}
export function removeTouchContextMenu(){
return {
type: 'REMOVE_TOUCH_CONTEXT_MENU'
}
export function removeTouchContextMenu() {
return {
type: 'REMOVE_TOUCH_CONTEXT_MENU',
};
}
export function lazyLoading(start){
return {
type: 'LAZY_LOADING',
start: start
}
export function lazyLoading(start) {
return {
type: 'LAZY_LOADING',
start,
};
}
export function toggleSidebar(new_state = 'toggle'){
var action = {
type: 'TOGGLE_SIDEBAR'
}
if (new_state != 'toggle'){
action.new_state = new_state
}
return action
export function toggleSidebar(new_state = 'toggle') {
const action = {
type: 'TOGGLE_SIDEBAR',
};
if (new_state != 'toggle') {
action.new_state = new_state;
}
return action;
}
export function dragStart(e, context, from_uri = null, victims, victims_indexes = null){
return {
type: 'DRAG_START',
context: context,
from_uri: from_uri,
victims: victims,
victims_indexes: victims_indexes,
start_x: e.clientX,
start_y: e.clientY
}
export function dragStart(e, context, from_uri = null, victims, victims_indexes = null) {
return {
type: 'DRAG_START',
context,
from_uri,
victims,
victims_indexes,
start_x: e.clientX,
start_y: e.clientY,
};
}
export function dragActive(){
return { type: 'DRAG_ACTIVE' }
export function dragActive() {
return { type: 'DRAG_ACTIVE' };
}
export function dragEnd(){
return { type: 'DRAG_END' }
export function dragEnd() {
return { type: 'DRAG_END' };
}
export function set(data){
return {
type: 'UI_SET',
data: data
}
export function set(data) {
return {
type: 'UI_SET',
data,
};
}
export function installPrompt(event){
return {
type: 'INSTALL_PROMPT',
event: event
}
export function installPrompt(event) {
return {
type: 'INSTALL_PROMPT',
event,
};
}
/**
* Notifications
*
* Subtle info/tooltip messages
**/
* */
export function createBrowserNotification(data){
return {
type: 'BROWSER_NOTIFICATION',
data: data
}
export function createBrowserNotification(data) {
return {
type: 'BROWSER_NOTIFICATION',
data,
};
}
export function createNotification(data){
export function createNotification(data) {
// Allow 'message' as an alias of our content
if (data.message) {
data.content = data.message;
}
// Allow 'message' as an alias of our content
if (data.message){
data.content = data.message;
}
// Shortcut notifications are short and sweet
if (data.type == 'shortcut'){
data.duration = 0.4;
}
// Shortcut notifications are short and sweet
if (data.type == 'shortcut') {
data.duration = 0.4;
}
return {
type: 'CREATE_NOTIFICATION',
notification: Object.assign(
{
key: helpers.generateGuid(),
duration: 5,
type: 'default',
title: null,
content: null,
description: null,
sticky: false,
closing: false,
render_content: false
},
data
)
}
return {
type: 'CREATE_NOTIFICATION',
notification: {
key: helpers.generateGuid(),
duration: 5,
type: 'default',
title: null,
content: null,
description: null,
sticky: false,
closing: false,
render_content: false,
...data,
},
};
}
export function closeNotification(key){
return {
type: 'CLOSE_NOTIFICATION',
key: key
}
export function closeNotification(key) {
return {
type: 'CLOSE_NOTIFICATION',
key,
};
}
export function removeNotification(key, manual = false){
return {
type: 'REMOVE_NOTIFICATION',
key: key,
manual: manual
}
export function removeNotification(key, manual = false) {
return {
type: 'REMOVE_NOTIFICATION',
key,
manual,
};
}
/**
* Loaders
**/
* */
export function startLoading(key,source){
return {
type: 'START_LOADING',
source: source,
key: key
}
export function startLoading(key, source) {
return {
type: 'START_LOADING',
source,
key,
};
}
export function stopLoading(key){
return {
type: 'STOP_LOADING',
key: key
}
export function stopLoading(key) {
return {
type: 'STOP_LOADING',
key,
};
}
export function startProcess(key,message,data = {}){
return {
type: 'START_PROCESS',
key: key,
message: message,
data: data
}
export function startProcess(key, message, data = {}) {
return {
type: 'START_PROCESS',
key,
message,
data,
};
}
export function resumeProcess(key,message,data = {}){
return {
type: 'RESUME_PROCESS',
key: key
}
export function resumeProcess(key, message, data = {}) {
return {
type: 'RESUME_PROCESS',
key,
};
}
export function updateProcess(key,message,data = {}){
return {
type: 'UPDATE_PROCESS',
key: key,
message: message,
data: data
}
export function updateProcess(key, message, data = {}) {
return {
type: 'UPDATE_PROCESS',
key,
message,
data,
};
}
export function runProcess(key,data = {}){
return {
type: key,
data: data
}
export function runProcess(key, data = {}) {
return {
type: key,
data,
};
}
export function cancelProcess(key){
return {
type: 'CANCEL_PROCESS',
key: key
}
export function cancelProcess(key) {
return {
type: 'CANCEL_PROCESS',
key,
};
}
export function processCancelled(key){
return {
type: 'PROCESS_CANCELLED',
key: key
}
export function processCancelled(key) {
return {
type: 'PROCESS_CANCELLED',
key,
};
}
export function processFinishing(key){
return {
type: 'PROCESS_FINISHING',
key: key
}
export function processFinishing(key) {
return {
type: 'PROCESS_FINISHING',
key,
};
}
export function processFinished(key){
return {
type: 'PROCESS_FINISHED',
key: key
}
export function processFinished(key) {
return {
type: 'PROCESS_FINISHED',
key,
};
}