From 4ae7a19cc980dd36e3f08175311b7285d3717647 Mon Sep 17 00:00:00 2001 From: nyne Date: Thu, 31 Jul 2025 16:11:47 +0800 Subject: [PATCH] Add a button to create collection. --- frontend/src/pages/resource_details_page.tsx | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/resource_details_page.tsx b/frontend/src/pages/resource_details_page.tsx index cca778c..ca8c005 100644 --- a/frontend/src/pages/resource_details_page.tsx +++ b/frontend/src/pages/resource_details_page.tsx @@ -26,6 +26,7 @@ import "../markdown.css"; import Loading from "../components/loading.tsx"; import { MdAdd, + MdOutlineAdd, MdOutlineArchive, MdOutlineArticle, MdOutlineComment, @@ -1597,6 +1598,8 @@ function CollectionDialog({ rid }: { rid: number }) { const debounce = new Debounce(500); + const navigate = useNavigate(); + const delayedSetSearchKeyword = (keyword: string) => { setSearchKeyword(keyword); debounce.run(() => { @@ -1633,6 +1636,10 @@ function CollectionDialog({ rid }: { rid: number }) { }); }; + if (!app.isLoggedIn()) { + return <> + } + return ( <> )}
+ +
- +