From a43e3db41633e149736a2153dbc97979a723771e Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 13 Jul 2025 02:07:34 +0900 Subject: feat(frontend): remove bulk edit form --- frontend/src/components/FeedList.tsx | 81 +++++----------------- frontend/src/pages/Settings.tsx | 130 ++--------------------------------- 2 files changed, 25 insertions(+), 186 deletions(-) diff --git a/frontend/src/components/FeedList.tsx b/frontend/src/components/FeedList.tsx index e5b6751..db12b13 100644 --- a/frontend/src/components/FeedList.tsx +++ b/frontend/src/components/FeedList.tsx @@ -1,8 +1,4 @@ -import { - faCheckDouble, - faCircle, - faTrash, -} from "@fortawesome/free-solid-svg-icons"; +import { faCheck, faCircle, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useMutation, useQuery } from "urql"; import { @@ -14,15 +10,9 @@ import { interface Props { onFeedUnsubscribed?: () => void; - selectedFeeds?: Set; - onSelectFeed?: (feedId: string, selected: boolean) => void; } -export function FeedList({ - onFeedUnsubscribed, - selectedFeeds, - onSelectFeed, -}: Props) { +export function FeedList({ onFeedUnsubscribed }: Props) { const [{ data, fetching, error }] = useQuery({ query: GetFeedsDocument, }); @@ -59,62 +49,27 @@ export function FeedList({ return (
{data.feeds.map((feed) => { - const unreadCount = feed.articles.filter((a) => !a.isRead).length; - const totalCount = feed.articles.length; - - const isSelected = selectedFeeds?.has(feed.id) ?? false; - return (
- {selectedFeeds && onSelectFeed && ( -
- onSelectFeed(feed.id, e.target.checked)} - className="mt-1 rounded border-gray-300 text-blue-600 focus:ring-blue-500" - /> -
-

- {feed.title} -

-

{feed.url}

-
- - {unreadCount} unread / {totalCount} total - - - Last fetched:{" "} - {new Date(feed.fetchedAt).toLocaleString()} - -
-
+
+

+ {feed.title} +

+

+ + {feed.url} + +

+
+ + Last fetched: {new Date(feed.fetchedAt).toLocaleString()} +
- )} - {(!selectedFeeds || !onSelectFeed) && ( -
-

- {feed.title} -

-

{feed.url}

-
- - {unreadCount} unread / {totalCount} total - - - Last fetched: {new Date(feed.fetchedAt).toLocaleString()} - -
-
- )} +
- - -
-
-
- )} - - +

+ Manage Feeds +

+
); -- cgit v1.2.3-70-g09d2