From 964186ce42dfeaa636f34e9a7c6484d45996a2a2 Mon Sep 17 00:00:00 2001
From: robo <30987265+Robonau@users.noreply.github.com>
Date: Fri, 4 Mar 2022 01:25:10 +0000
Subject: [PATCH] Source filters, move search to SourceMangas (#142)
* source genre filter
much the same as the library version
* undo
* base
base + SelectFilter + CheckBoxFilter
haven't done useQueryParam yet
* gui done
left to do:
1.saving the input data (so it don't disappear when closing the drawer)
2.post to update
3.reload list after drawer close
* done ish
* done im tired
* ok, actually done now
worked out the breaking that was happening in the last commit
im probably using useState for more than is nessessary, only really needed to do triggerUpdate and Data
* key error/warning fix
* issues all done
* remove junk
* jank back button fix
i re-used the query querystring
* reove single search
* boi was that a pain to fix
* Update App.tsx
---
src/App.tsx | 4 -
src/components/SourceCard.tsx | 29 +--
src/components/source/SourceMangaGrid.tsx | 37 ++++
src/components/source/SourceOptions.tsx | 203 ++++++++++++++++++
.../source/filters/CheckBoxFilter.tsx | 53 +++++
src/components/source/filters/GroupFilter.tsx | 54 +++++
.../source/filters/HeaderFilter.tsx | 19 ++
.../source/filters/SelectFilter.tsx | 150 +++++++++++++
.../source/filters/SeparatorFilter.tsx | 18 ++
src/components/source/filters/SortFilter.tsx | 95 ++++++++
src/components/source/filters/TextFilter.tsx | 72 +++++++
.../source/filters/TriStateFilter.tsx | 70 ++++++
src/screens/SearchSingle.tsx | 121 -----------
src/screens/SourceMangas.tsx | 195 +++++++++++++----
src/typings.d.ts | 23 ++
src/util/useLibraryOptions.ts | 4 +
16 files changed, 957 insertions(+), 190 deletions(-)
create mode 100644 src/components/source/SourceMangaGrid.tsx
create mode 100644 src/components/source/SourceOptions.tsx
create mode 100644 src/components/source/filters/CheckBoxFilter.tsx
create mode 100644 src/components/source/filters/GroupFilter.tsx
create mode 100644 src/components/source/filters/HeaderFilter.tsx
create mode 100644 src/components/source/filters/SelectFilter.tsx
create mode 100644 src/components/source/filters/SeparatorFilter.tsx
create mode 100644 src/components/source/filters/SortFilter.tsx
create mode 100644 src/components/source/filters/TextFilter.tsx
create mode 100644 src/components/source/filters/TriStateFilter.tsx
delete mode 100644 src/screens/SearchSingle.tsx
diff --git a/src/App.tsx b/src/App.tsx
index e620069c..367e852a 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -29,7 +29,6 @@ import About from 'screens/settings/About';
import Categories from 'screens/settings/Categories';
import Backup from 'screens/settings/Backup';
import Library from 'screens/Library';
-import SearchSingle from 'screens/SearchSingle';
import SourceConfigure from 'screens/SourceConfigure';
import Manga from 'screens/Manga';
import SourceMangas from 'screens/SourceMangas';
@@ -131,9 +130,6 @@ export default function App() {
{/* Manga Routes */}
-
-
-
diff --git a/src/components/SourceCard.tsx b/src/components/SourceCard.tsx
index 3a4bb1fc..6237ab14 100644
--- a/src/components/SourceCard.tsx
+++ b/src/components/SourceCard.tsx
@@ -9,10 +9,7 @@ import React from 'react';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import { useHistory } from 'react-router-dom';
-import SearchIcon from '@mui/icons-material/Search';
import Button from '@mui/material/Button';
-import IconButton from '@mui/material/IconButton';
-import FiberNewOutlinedIcon from '@mui/icons-material/FiberNewOutlined';
import Avatar from '@mui/material/Avatar';
import Typography from '@mui/material/Typography';
import useLocalStorage from 'util/useLocalStorage';
@@ -108,34 +105,16 @@ export default function SourceCard(props: IProps) {
<>
- redirectTo(e, `/sources/${id}/search/`)}
- size="large"
- edge="end"
- >
-
-
{supportsLatest && (
- redirectTo(e, `/sources/${id}/latest/`)}
- size="large"
>
-
-
+ Latest
+
)}
-
{supportsLatest && (