diff --git a/js/ClutterBar.jsx b/js/ClutterBar.jsx new file mode 100644 index 00000000..aac66df1 --- /dev/null +++ b/js/ClutterBar.jsx @@ -0,0 +1,37 @@ +import React from 'react'; +import {connect} from 'react-redux'; + + +class ClutterBar extends React.Component { + constructor(props) { + super(props); + this.handleMouseDownDouble = this.handleMouseDownDouble.bind(this); + this.handleMouseUpDouble = this.handleMouseUpDouble.bind(this); + } + + handleMouseDownDouble() { + this.props.dispatch({type: 'SET_FOCUS', input: 'double'}); + } + + handleMouseUpDouble() { + this.props.dispatch({type: 'TOGGLE_DOUBLESIZE_MODE'}); + this.props.dispatch({type: 'UNSET_FOCUS'}); + } + + render() { + return
+
+
+
+
+
+
; + } +} + +module.exports = connect(state => state.display)(ClutterBar); diff --git a/js/MainWindow.jsx b/js/MainWindow.jsx index 6e340fb1..1265245e 100644 --- a/js/MainWindow.jsx +++ b/js/MainWindow.jsx @@ -5,6 +5,7 @@ import classnames from 'classnames'; import Actions from './Actions.jsx'; import Balance from './Balance.jsx'; import Close from './Close.jsx'; +import ClutterBar from './ClutterBar.jsx'; import ContextMenu from './ContextMenu.jsx'; import DragTarget from './DragTarget.jsx'; import Eject from './Eject.jsx'; @@ -54,13 +55,7 @@ const MainWindow = (props) => {
-
-
-
-
-
-
-
+