mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 11:04:00 +00:00
Remove last string constants
This commit is contained in:
parent
587ea68f55
commit
3dc8c0b58f
7 changed files with 22 additions and 10 deletions
|
|
@ -11,6 +11,10 @@ import {
|
|||
setEqToMin
|
||||
} from '../actionCreators';
|
||||
|
||||
import {
|
||||
SET_FOCUSED_WINDOW
|
||||
} from '../actionTypes';
|
||||
|
||||
import Band from './Band.jsx';
|
||||
import EqOn from './EqOn.jsx';
|
||||
import EqAuto from './EqAuto.jsx';
|
||||
|
|
@ -82,7 +86,7 @@ class EqualizerWindow extends React.Component {
|
|||
}
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
focusWindow: () => dispatch({type: 'SET_FOCUSED_WINDOW', window: WINDOWS.EQUALIZER}),
|
||||
focusWindow: () => dispatch({type: SET_FOCUSED_WINDOW, window: WINDOWS.EQUALIZER}),
|
||||
setPreampValue: (mediaPlayer) => (e) => dispatch(setPreamp(mediaPlayer, e.target.value)),
|
||||
setEqToMin: (mediaPlayer) => () => dispatch(setEqToMin(mediaPlayer)),
|
||||
setEqToMid: (mediaPlayer) => () => dispatch(setEqToMid(mediaPlayer)),
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@ import Time from './Time.jsx';
|
|||
import Visualizer from './Visualizer.jsx';
|
||||
import Volume from './Volume.jsx';
|
||||
|
||||
import {
|
||||
SET_FOCUSED_WINDOW
|
||||
} from '../actionTypes';
|
||||
|
||||
import '../../css/main-window.css';
|
||||
|
||||
export class MainWindow extends React.Component {
|
||||
|
|
@ -35,7 +39,7 @@ export class MainWindow extends React.Component {
|
|||
}
|
||||
|
||||
handleClick() {
|
||||
this.props.dispatch({type: 'SET_FOCUSED_WINDOW', window: WINDOWS.MAIN});
|
||||
this.props.dispatch({type: SET_FOCUSED_WINDOW, window: WINDOWS.MAIN});
|
||||
}
|
||||
|
||||
supress(e) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// Single line text display that can animate and hold multiple registers
|
||||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {getTimeStr} from '../utils';
|
||||
|
||||
import {STEP_MARQUEE} from '../actionTypes';
|
||||
|
||||
const getBalanceText = (balance) => {
|
||||
if (balance === 0) {
|
||||
return 'Balance: Center';
|
||||
|
|
@ -54,7 +55,7 @@ class Marquee extends React.Component {
|
|||
const step = () => {
|
||||
setTimeout(() => {
|
||||
if (this.state.stepping) {
|
||||
this.props.dispatch({type: 'STEP_MARQUEE'});
|
||||
this.props.dispatch({type: STEP_MARQUEE});
|
||||
}
|
||||
step();
|
||||
}, 220);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {TOGGLE_SHADE_MODE} from '../actionTypes';
|
||||
|
||||
class Shade extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.handleClick = this.handleClick.bind(this);
|
||||
}
|
||||
handleClick() {
|
||||
this.props.dispatch({type: 'TOGGLE_SHADE_MODE'});
|
||||
this.props.dispatch({type: TOGGLE_SHADE_MODE});
|
||||
}
|
||||
render() {
|
||||
return <div
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {getTimeObj} from '../utils';
|
||||
import Character from './Character.jsx';
|
||||
|
||||
import {TOGGLE_TIME_MODE} from '../actionTypes';
|
||||
|
||||
class Time extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -11,7 +11,7 @@ class Time extends React.Component {
|
|||
this.toggleTimeMode = this.toggleTimeMode.bind(this);
|
||||
}
|
||||
toggleTimeMode() {
|
||||
this.props.dispatch({type: 'TOGGLE_TIME_MODE'});
|
||||
this.props.dispatch({type: TOGGLE_TIME_MODE});
|
||||
}
|
||||
render() {
|
||||
const seconds = this.props.timeMode === 'ELAPSED' ?
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {getTimeObj} from '../utils';
|
||||
|
||||
import {TOGGLE_TIME_MODE} from '../actionTypes';
|
||||
|
||||
const Time = ({timeElapsed, length, timeMode, toggleTimeMode}) => {
|
||||
const seconds = timeMode === 'ELAPSED' ?
|
||||
timeElapsed :
|
||||
|
|
@ -20,7 +21,7 @@ const Time = ({timeElapsed, length, timeMode, toggleTimeMode}) => {
|
|||
|
||||
const mapStateToProps = (state) => state.media;
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleTimeMode: () => dispatch({type: 'TOGGLE_TIME_MODE'})
|
||||
toggleTimeMode: () => dispatch({type: TOGGLE_TIME_MODE})
|
||||
});
|
||||
|
||||
module.exports = connect(mapStateToProps, mapDispatchToProps)(Time);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
setBalance
|
||||
} from './actionCreators';
|
||||
|
||||
import {SET_MEDIA} from '../actionTypes';
|
||||
import {SET_MEDIA} from './actionTypes';
|
||||
|
||||
import '../css/winamp.css';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue