Add eq shade state to reducer

This commit is contained in:
Jordan Eldredge 2017-07-01 14:33:40 -07:00
parent 22eda9257c
commit 369589e460
3 changed files with 12 additions and 2 deletions

View File

@ -20,7 +20,8 @@ import {
TOGGLE_REPEAT,
TOGGLE_SHUFFLE,
SET_EQ_ON,
SET_EQ_OFF
SET_EQ_OFF,
TOGGLE_EQUALIZER_SHADE_MODE
} from "./actionTypes";
export function play() {
@ -42,7 +43,7 @@ export function stop() {
}
export function seekForward(seconds) {
return function(dispatch, getState) {
return function (dispatch, getState) {
const { media } = getState();
const { timeElapsed, length } = media;
const newTimeElapsed = timeElapsed + seconds;
@ -222,3 +223,7 @@ export function downloadPreset() {
downloadURI(dataURI, "entry.eqf");
};
}
export function toggleEqualizerShadeMode() {
return { type: TOGGLE_EQUALIZER_SHADE_MODE };
}

View File

@ -32,6 +32,7 @@ export const SET_EQ_OFF = "SET_EQ_OFF";
export const TOGGLE_LLAMA_MODE = "TOGGLE_LLAMA_MODE";
export const TOGGLE_REPEAT = "TOGGLE_REPEAT";
export const TOGGLE_SHADE_MODE = "TOGGLE_SHADE_MODE";
export const TOGGLE_EQUALIZER_SHADE_MODE = "TOGGLE_EQUALIZER_SHADE_MODE";
export const TOGGLE_SHUFFLE = "TOGGLE_SHUFFLE";
export const TOGGLE_TIME_MODE = "TOGGLE_TIME_MODE";
export const TOGGLE_VISUALIZER_STYLE = "TOGGLE_VISUALIZER_STYLE";

View File

@ -26,6 +26,7 @@ import {
TOGGLE_LLAMA_MODE,
TOGGLE_REPEAT,
TOGGLE_SHADE_MODE,
TOGGLE_EQUALIZER_SHADE_MODE,
TOGGLE_SHUFFLE,
TOGGLE_TIME_MODE,
TOGGLE_VISUALIZER_STYLE,
@ -81,6 +82,7 @@ const display = (state, action) => {
llama: false,
closed: false,
shade: false,
equalizerShade: false,
working: false,
skinImages: {},
skinColors: null,
@ -93,6 +95,8 @@ const display = (state, action) => {
return { ...state, doubled: !state.doubled };
case TOGGLE_SHADE_MODE:
return { ...state, shade: !state.shade };
case TOGGLE_EQUALIZER_SHADE_MODE:
return { ...state, equalizerShade: !state.shade };
case TOGGLE_LLAMA_MODE:
return { ...state, llama: !state.llama };
case STEP_MARQUEE: