mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Add bare-bones equalizer component
This commit is contained in:
parent
f14854443d
commit
162178988f
4 changed files with 44 additions and 0 deletions
10
css/equalizer-window.css
Normal file
10
css/equalizer-window.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* Styles */
|
||||
#winamp2-js #equalizer-window {
|
||||
height: 116px;
|
||||
width: 275px;
|
||||
}
|
||||
|
||||
#winamp2-js .equalizer-top {
|
||||
height: 14px;
|
||||
width: 275px;
|
||||
}
|
||||
23
js/components/EqualizerWindow.jsx
Normal file
23
js/components/EqualizerWindow.jsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import DraggableWindow from './DraggableWindow.jsx';
|
||||
|
||||
import '../../css/equalizer-window.css';
|
||||
|
||||
const EqualizerWindow = (props) => {
|
||||
const {doubled} = props.display;
|
||||
|
||||
const className = classnames({
|
||||
window: true,
|
||||
doubled
|
||||
});
|
||||
return <DraggableWindow handleClass='title-bar'>
|
||||
<div id='equalizer-window' className={className}>
|
||||
<div className='equalizer-top title-bar' />
|
||||
</div>
|
||||
</DraggableWindow>;
|
||||
};
|
||||
|
||||
module.exports = connect((state) => state)(EqualizerWindow);
|
||||
|
|
@ -9,12 +9,14 @@ import reducer from './reducers';
|
|||
import Browser from './browser';
|
||||
import MainWindow from './components/MainWindow.jsx';
|
||||
import PlaylistWindow from './components/PlaylistWindow.jsx';
|
||||
import EqualizerWindow from './components/EqualizerWindow.jsx';
|
||||
import Winamp from './winamp';
|
||||
import Hotkeys from './hotkeys';
|
||||
import Skin from './components/Skin.jsx';
|
||||
|
||||
if (new Browser(window).isCompatible) {
|
||||
const playlist = false; // Turn on the incomplete playlist window
|
||||
const equalizer = false; // Turn on the incomplete equalizer window
|
||||
const winamp = Winamp;
|
||||
const store = createStore(
|
||||
reducer,
|
||||
|
|
@ -31,6 +33,7 @@ if (new Browser(window).isCompatible) {
|
|||
</Skin>
|
||||
<MainWindow winamp={winamp} mediaPlayer={winamp.media} />
|
||||
{ playlist ? <PlaylistWindow /> : '' }
|
||||
{ equalizer ? <EqualizerWindow /> : '' }
|
||||
</div>
|
||||
</Provider>,
|
||||
document.getElementById('winamp2-js')
|
||||
|
|
|
|||
|
|
@ -138,6 +138,14 @@ module.exports = [
|
|||
{selectors: ['#playlist.shade'], x: 72, y: 57, width: 25, height: 14}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'EQMAIN',
|
||||
sprites: [
|
||||
{selectors: ['#equalizer-window'], x: 0, y: 0, width: 275, height: 116},
|
||||
{selectors: ['.equalizer-top'], x: 0, y: 149, width: 275, height: 14},
|
||||
{selectors: ['.selected .equalizer-top'], x: 0, y: 134, width: 275, height: 14}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'POSBAR',
|
||||
sprites: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue