Fixing Discover Categories; Upgrading hotkeys to slicker plugin, adding Snapcast volume hotkeys

This commit is contained in:
James Barnsley
2021-03-30 21:27:18 +13:00
parent 875f64b616
commit 86f63b89b4
13 changed files with 1237 additions and 19848 deletions

View File

@ -38,7 +38,7 @@ const CheckboxSetting = ({
checked={checked}
onChange={() => dispatch(uiActions.set({ [name]: !checked }))}
/>
<span className={`label ${tooltip ? 'tooltip' :''}`}>
<span className={`label ${tooltip ? 'tooltip' : ''}`}>
{label}
{tooltip && (
<span className="tooltip__content">

View File

@ -15,6 +15,7 @@ import {
makeItemSelector,
makeLoadingSelector,
} from '../../util/selectors';
import { decodeUri } from '../../util/format';
class DiscoverCategory extends React.Component {
componentDidMount() {
@ -126,7 +127,7 @@ class DiscoverCategory extends React.Component {
}
const mapStateToProps = (state, ownProps) => {
const uri = decodeURIComponent(ownProps.match.params.uri);
const uri = decodeUri(ownProps.match.params.uri);
const loadingSelector = makeLoadingSelector([`spotify_category_${uri}`]);
const categorySelector = makeItemSelector(uri);
const category = categorySelector(state);

View File

@ -13,8 +13,8 @@ const hotkeys = [
{ label: 'fastforward', keys: ['f'] },
{ label: 'next', keys: ['.', '>'] },
{ label: 'previous', keys: [',', '<'] },
{ label: 'volume_up', keys: ['=', '+'] },
{ label: 'volume_down', keys: ['-', '_'] },
{ label: 'volume_up', keys: ['='] },
{ label: 'volume_down', keys: ['-'] },
{ label: 'mute', keys: ['0'] },
{ label: 'exit', keys: ['esc'] },
{ label: 'now_playing', keys: ['1'] },