diff --git a/js/Eject.jsx b/js/Eject.jsx new file mode 100644 index 00000000..4a753b4e --- /dev/null +++ b/js/Eject.jsx @@ -0,0 +1,21 @@ +import React from 'react'; +import {connect} from 'react-redux'; + + +class Eject extends React.Component { + constructor(props) { + super(props); + this.handleClick = this.handleClick.bind(this); + } + handleClick() { + this.props.dispatch({type: 'OPEN_FILE_DIALOG'}); + } + render() { + return
; + } +} + +module.exports = connect()(Eject); diff --git a/js/main-window-dom.js b/js/main-window-dom.js index d640892f..107caa43 100644 --- a/js/main-window-dom.js +++ b/js/main-window-dom.js @@ -57,7 +57,7 @@ module.exports = el('div', {id: 'main-window', class: 'loading stop'}, [ ]), el('div', {id: 'position-holder'}), el('div', {id: 'actions-holder'}), - el('div', {id: 'eject'}), + el('div', {id: 'eject-holder'}), el('div', {class: 'shuffle-repeat'}, [ el('div', {id: 'shuffle-holder'}), el('div', {id: 'repeat-holder'}) diff --git a/js/main-window.js b/js/main-window.js index df3b23ed..c1659bcf 100644 --- a/js/main-window.js +++ b/js/main-window.js @@ -11,6 +11,7 @@ import Position from './Position.jsx'; import MonoStereo from './MonoStereo.jsx'; import Repeat from './Repeat.jsx'; import Shuffle from './Shuffle.jsx'; +import Eject from './Eject.jsx'; import '../css/main-window.css'; @@ -22,9 +23,7 @@ module.exports = { shade: document.getElementById('shade'), buttonD: document.getElementById('button-d'), visualizer: document.getElementById('visualizer'), - eject: document.getElementById('eject'), workIndicator: document.getElementById('work-indicator'), - titleBar: document.getElementById('title-bar'), window: document.getElementById('main-window') }; @@ -43,6 +42,7 @@ module.exports = { this.winamp.renderTo(