From 5f237aa2e3c103802a9247d09014224f46f86440 Mon Sep 17 00:00:00 2001 From: JakeBreath Date: Wed, 23 Sep 2026 21:57:48 -0500 Subject: [PATCH] Widen the header and collapse blacklist listings by default - the header row is no longer capped at 1600px, so the nav hugs the left edge and the status/account controls the right; main content and footer keep their width - OnlinePage's blacklist chips and the Followed page's blacklisted-tag cloud start collapsed behind a count toggle (N tags / N entries) --- frontend/src/components/AppShell.tsx | 2 +- .../src/features/follows/FollowedPage.tsx | 85 ++++++---- frontend/src/features/online/OnlinePage.tsx | 147 ++++++++++-------- 3 files changed, 135 insertions(+), 99 deletions(-) diff --git a/frontend/src/components/AppShell.tsx b/frontend/src/components/AppShell.tsx index 830457f..28dad17 100644 --- a/frontend/src/components/AppShell.tsx +++ b/frontend/src/components/AppShell.tsx @@ -113,7 +113,7 @@ export function AppShell() { return (
-
+
J621 diff --git a/frontend/src/features/follows/FollowedPage.tsx b/frontend/src/features/follows/FollowedPage.tsx index a793658..4e05e99 100644 --- a/frontend/src/features/follows/FollowedPage.tsx +++ b/frontend/src/features/follows/FollowedPage.tsx @@ -1,5 +1,5 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { Eye, StarOff } from "lucide-react"; +import { ChevronDown, ChevronRight, Eye, StarOff } from "lucide-react"; import { useState } from "react"; import { Link } from "react-router-dom"; @@ -148,48 +148,65 @@ function BlacklistCloudPanel() { q.state.data?.status === "building" ? 2000 : false, }); const cloud = query.data; + const [expanded, setExpanded] = useState(false); return (
-
+
+ {expanded ? ( + + ) : ( + + )} + + - {query.isPending ? ( -
- -
- ) : cloud && cloud.tags.length > 0 ? ( -
- {cloud.tags.map(([tag, count]) => ( - - {tag} ({count}) - - ))} -
- ) : ( -

- No blacklisted tags in your feeds. -

- )} + {expanded ? ( + <> +

+ {cloud?.source === "user" + ? "From your e621 blacklist" + : "From e621's anonymous default blacklist"} + {cloud ? ` · ${cloud.posts} feed post(s) scanned` : ""} + {cloud?.computed_at + ? ` · computed ${formatDate(cloud.computed_at)}` + : ""} +

+ {query.isPending ? ( +
+ +
+ ) : cloud && cloud.tags.length > 0 ? ( +
+ {cloud.tags.map(([tag, count]) => ( + + {tag} ({count}) + + ))} +
+ ) : ( +

+ No blacklisted tags in your feeds. +

+ )} + + ) : null}
); } diff --git a/frontend/src/features/online/OnlinePage.tsx b/frontend/src/features/online/OnlinePage.tsx index f4f84a0..28efb95 100644 --- a/frontend/src/features/online/OnlinePage.tsx +++ b/frontend/src/features/online/OnlinePage.tsx @@ -1,5 +1,5 @@ import { keepPreviousData, useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { X } from "lucide-react"; +import { ChevronDown, ChevronRight, X } from "lucide-react"; import { useEffect, useMemo, useRef, useState } from "react"; import { Link, useLocation, useSearchParams } from "react-router-dom"; @@ -43,6 +43,7 @@ export default function OnlinePage() { const queryClient = useQueryClient(); const [draft, setDraft] = useState(null); const [blacklistDraft, setBlacklistDraft] = useState(""); + const [showBlacklist, setShowBlacklist] = useState(false); const tagInput = draft ?? tags; const zoom = useUi((state) => state.zoom); const perPage = useUi((state) => state.e621PerPage); @@ -271,73 +272,91 @@ export default function OnlinePage() {
- - Your blacklist - - {credentials?.configured ? ( - <> - {blacklistEntries.length > 0 ? ( -
- {blacklistEntries.map(({ line, index }) => ( - - {line} - - - ))} -
+ + {showBlacklist ? ( + credentials?.configured ? ( + <> + {blacklistEntries.length > 0 ? ( +
+ {blacklistEntries.map(({ line, index }) => ( + + {line} + + + ))} +
+ ) : ( +

+ No blacklisted tags. +

+ )} + { + event.preventDefault(); + addBlacklistEntry(); + }} + className="flex gap-2" > - {blacklistMutation.isPending ? ( - - ) : ( - "Add" - )} - - -

- Saved to your e621 account. + setBlacklistDraft(event.target.value)} + /> + + +

+ Saved to your e621 account. +

+ + ) : ( +

+ + Add e621 credentials + {" "} + to manage your blacklist.

- - ) : ( -

- - Add e621 credentials - {" "} - to manage your blacklist. -

- )} + ) + ) : null}