diff --git a/css/playlist-window.css b/css/playlist-window.css index 9faf2e56..0887feda 100644 --- a/css/playlist-window.css +++ b/css/playlist-window.css @@ -134,6 +134,46 @@ position: absolute; } +#winamp2-js .playlist-menu li { + list-style: none; + display: block; + display: none; + width: 22px; + height: 18px; +} + +#winamp2-js .playlist-menu.selected ul { + padding: 0; + margin: 0; + position: absolute; + bottom: 0; +} + +#winamp2-js .playlist-menu.selected li { + list-style: none; + display: block; + width: 22px; + height: 18px; + padding: 0; + margin: 0; +} + +#winamp2-js .playlist-menu .bar { + position: absolute; + bottom: 0; + left: -3px; + width: 3px; + height: 54px; +} + +#winamp2-js #playlist-selection-menu { + position: absolute; + bottom: 12px; + left: 72px; + width: 22px; + height: 18px; +} + #winamp2-js .playlist-bottom-right { width: 150px; height: 100%; diff --git a/js/actionTypes.js b/js/actionTypes.js index 95895a0e..1ecfbc80 100644 --- a/js/actionTypes.js +++ b/js/actionTypes.js @@ -42,3 +42,6 @@ export const UNSET_USER_MESSAGE = "UNSET_USER_MESSAGE"; export const SET_PLAYLIST_SCROLL_POSITION = "SET_PLAYLIST_SCROLL_POSITION"; export const CLICKED_TRACK = "CLICKED_TRACK"; export const CTRL_CLICKED_TRACK = "CTRL_CLICKED_TRACK"; +export const SELECT_ALL = "SELECT_ALL"; +export const SELECT_ZERO = "SELECT_ZERO"; +export const INVERT_SELECTION = "INVERT_SELECTION"; diff --git a/js/components/PlaylistWindow/SelectionMenu.js b/js/components/PlaylistWindow/SelectionMenu.js new file mode 100644 index 00000000..3876ddaf --- /dev/null +++ b/js/components/PlaylistWindow/SelectionMenu.js @@ -0,0 +1,21 @@ +import React from "react"; +import { connect } from "react-redux"; +import { SELECT_ALL, SELECT_ZERO, INVERT_SELECTION } from "../../actionTypes"; + +const SelectionMenu = props => ( +
+); + +const mapDispatchToProps = { + invertSelection: () => ({ type: INVERT_SELECTION }), + selectAll: () => ({ type: SELECT_ALL }), + selectZero: () => ({ type: SELECT_ZERO }) +}; +export default connect(null, mapDispatchToProps)(SelectionMenu); diff --git a/js/components/PlaylistWindow/index.js b/js/components/PlaylistWindow/index.js index 81498fba..ad868c6b 100644 --- a/js/components/PlaylistWindow/index.js +++ b/js/components/PlaylistWindow/index.js @@ -5,6 +5,7 @@ import Slider from "rc-slider/lib/Slider"; import MiniTime from "../MiniTime"; import Track from "./Track"; +import SelectionMenu from "./SelectionMenu"; import { percentToIndex } from "../../utils"; import { WINDOWS } from "../../constants"; import { @@ -81,7 +82,9 @@ const PlaylistWindow = props => {