mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 02:57:30 +00:00
Use constants
This commit is contained in:
parent
341fe27013
commit
c3b8b92df6
1 changed files with 10 additions and 5 deletions
|
|
@ -1,6 +1,11 @@
|
|||
import { combineReducers } from "redux";
|
||||
import { BANDS, WINDOWS } from "../constants";
|
||||
import {
|
||||
PLAY,
|
||||
IS_PLAYING,
|
||||
PAUSE,
|
||||
STOP,
|
||||
IS_STOPPED,
|
||||
CLOSE_WINAMP,
|
||||
SET_BALANCE,
|
||||
SET_BAND_VALUE,
|
||||
|
|
@ -230,13 +235,13 @@ const media = (state, action) => {
|
|||
}
|
||||
switch (action.type) {
|
||||
// TODO: Make these constants
|
||||
case "PLAY":
|
||||
case "IS_PLAYING":
|
||||
case PLAY:
|
||||
case IS_PLAYING:
|
||||
return { ...state, status: "PLAYING" };
|
||||
case "PAUSE":
|
||||
case PAUSE:
|
||||
return { ...state, status: "PAUSED" };
|
||||
case "STOP":
|
||||
case "IS_STOPPED":
|
||||
case STOP:
|
||||
case IS_STOPPED:
|
||||
return { ...state, status: "STOPPED" };
|
||||
case TOGGLE_TIME_MODE:
|
||||
const newMode = state.timeMode === "REMAINING" ? "ELAPSED" : "REMAINING";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue