@@ -221,7 +246,28 @@ const AdvancedFilters = ({ filteredData, originalData, filter, setAdvancedFilter
-
Artists
+
+
+ Artists
+
+ 0 ? 'primary' : 'subtle'}
+ disabled={filter.properties.artist.list.length === 0}
+ onClick={() => {
+ dispatch(
+ setAdvancedFilters({
+ filter: 'artist',
+ value: { ...filter.properties.artist, list: [] },
+ })
+ );
+ }}
+ >
+ Reset
+
+
+
+
{
+ (document.querySelectorAll('.rs-picker-search-bar-input')[0] as HTMLElement).focus();
+ }}
renderMenuItem={(label: string, item: any) => {
return (
@@ -284,7 +334,12 @@ const AdvancedFilters = ({ filteredData, originalData, filter, setAdvancedFilter
{
dispatch(
setAdvancedFilters({
diff --git a/src/components/library/AlbumList.tsx b/src/components/library/AlbumList.tsx
index 0a508f7..72e4dd9 100644
--- a/src/components/library/AlbumList.tsx
+++ b/src/components/library/AlbumList.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import _ from 'lodash';
import settings from 'electron-settings';
-import { ButtonToolbar, Icon, Whisper } from 'rsuite';
+import { ButtonToolbar, Whisper } from 'rsuite';
import { useQuery, useQueryClient } from 'react-query';
import { useHistory } from 'react-router-dom';
import GridViewType from '../viewtypes/GridViewType';
@@ -18,12 +18,12 @@ import {
clearSelected,
} from '../../redux/multiSelectSlice';
import {
- StyledIconButton,
StyledInputPicker,
StyledInputPickerContainer,
StyledPopover,
+ StyledTag,
} from '../shared/styled';
-import { RefreshButton } from '../shared/ToolbarButtons';
+import { FilterButton, RefreshButton } from '../shared/ToolbarButtons';
import { setActive, setAdvancedFilters } from '../../redux/albumSlice';
import { setSearchQuery } from '../../redux/miscSlice';
import { apiController } from '../../api/controller';
@@ -229,7 +229,14 @@ const AlbumList = () => {
hideDivider
header={
+ Albums{' '}
+
+ {filteredData?.length || '...'}
+
+ >
+ }
subtitle={
@@ -257,41 +264,43 @@ const AlbumList = () => {
setIsRefresh(false);
}}
/>
-
-
-
- }
- >
- } />
-
- {' '}
- {filteredData?.length}
+
}
subsidetitle={<>>}
+ sidetitle={
+ <>
+
+
+
+ }
+ >
+
+
+ >
+ }
showViewTypeButtons
viewTypeSetting="album"
handleListClick={() => setViewType('list')}
diff --git a/src/components/shared/ToolbarButtons.tsx b/src/components/shared/ToolbarButtons.tsx
index afeb00b..31918d0 100644
--- a/src/components/shared/ToolbarButtons.tsx
+++ b/src/components/shared/ToolbarButtons.tsx
@@ -133,6 +133,15 @@ export const RefreshButton = ({ ...rest }) => {
);
};
+export const FilterButton = ({ ...rest }) => {
+ return (
+
+
+ Filter
+
+ );
+};
+
export const AutoPlaylistButton = ({ noText, ...rest }: any) => {
return (