feat(filters): add customizable visible filters setting (#2625)
This commit is contained in:
@@ -166,6 +166,44 @@ export interface TableColumnPreference {
|
||||
order: number;
|
||||
}
|
||||
|
||||
export type VisibleFilterType =
|
||||
| 'author' | 'category' | 'series' | 'bookType' | 'readStatus'
|
||||
| 'personalRating' | 'publisher' | 'matchScore' | 'library' | 'shelf'
|
||||
| 'shelfStatus' | 'tag' | 'publishedDate' | 'fileSize' | 'amazonRating'
|
||||
| 'goodreadsRating' | 'hardcoverRating' | 'language' | 'pageCount' | 'mood'
|
||||
| 'ageRating' | 'contentRating';
|
||||
|
||||
export const DEFAULT_VISIBLE_FILTERS: VisibleFilterType[] = [
|
||||
'author', 'category', 'series', 'bookType', 'readStatus',
|
||||
'personalRating', 'library', 'tag', 'ageRating', 'contentRating',
|
||||
'matchScore', 'publisher', 'publishedDate', 'fileSize'
|
||||
];
|
||||
|
||||
export const ALL_FILTER_OPTIONS: { label: string; value: VisibleFilterType }[] = [
|
||||
{label: 'Author', value: 'author'},
|
||||
{label: 'Genre', value: 'category'},
|
||||
{label: 'Series', value: 'series'},
|
||||
{label: 'Book Type', value: 'bookType'},
|
||||
{label: 'Read Status', value: 'readStatus'},
|
||||
{label: 'Personal Rating', value: 'personalRating'},
|
||||
{label: 'Library', value: 'library'},
|
||||
{label: 'Tag', value: 'tag'},
|
||||
{label: 'Age Rating', value: 'ageRating'},
|
||||
{label: 'Content Rating', value: 'contentRating'},
|
||||
{label: 'Metadata Match Score', value: 'matchScore'},
|
||||
{label: 'Publisher', value: 'publisher'},
|
||||
{label: 'Published Year', value: 'publishedDate'},
|
||||
{label: 'File Size', value: 'fileSize'},
|
||||
{label: 'Shelf', value: 'shelf'},
|
||||
{label: 'Shelf Status', value: 'shelfStatus'},
|
||||
{label: 'Language', value: 'language'},
|
||||
{label: 'Page Count', value: 'pageCount'},
|
||||
{label: 'Mood', value: 'mood'},
|
||||
{label: 'Amazon Rating', value: 'amazonRating'},
|
||||
{label: 'Goodreads Rating', value: 'goodreadsRating'},
|
||||
{label: 'Hardcover Rating', value: 'hardcoverRating'}
|
||||
];
|
||||
|
||||
export interface UserSettings {
|
||||
perBookSetting: PerBookSetting;
|
||||
pdfReaderSetting: PdfReaderSetting;
|
||||
@@ -177,6 +215,7 @@ export interface UserSettings {
|
||||
sidebarShelfSorting: SidebarShelfSorting;
|
||||
sidebarMagicShelfSorting: SidebarMagicShelfSorting;
|
||||
filterMode: BookFilterMode;
|
||||
visibleFilters?: VisibleFilterType[];
|
||||
metadataCenterViewMode: 'route' | 'dialog';
|
||||
enableSeriesView: boolean;
|
||||
entityViewPreferences: EntityViewPreferences;
|
||||
|
||||
Reference in New Issue
Block a user