From 0c841f27236d01cbf57321fde0be6b1cc302becb Mon Sep 17 00:00:00 2001 From: nyne Date: Fri, 1 Aug 2025 17:30:12 +0800 Subject: [PATCH] Improve collection permission. --- frontend/src/pages/collection_page.tsx | 14 ++++++------- frontend/src/pages/create_collection_page.tsx | 12 +++++------ frontend/src/pages/user_page.tsx | 9 ++++---- server/dao/collection.go | 21 ++++++++++++------- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/frontend/src/pages/collection_page.tsx b/frontend/src/pages/collection_page.tsx index e8c3c32..535dd70 100644 --- a/frontend/src/pages/collection_page.tsx +++ b/frontend/src/pages/collection_page.tsx @@ -6,7 +6,7 @@ import { Collection } from "../network/models"; import Markdown from "react-markdown"; import ResourcesView from "../components/resources_view"; import Loading from "../components/loading"; -import { MdOutlineAdd, MdOutlineDelete, MdOutlineEdit } from "react-icons/md"; +import { MdOutlineDelete, MdOutlineEdit, MdOutlineLock } from "react-icons/md"; import { app } from "../app"; import { useTranslation } from "../utils/i18n"; import Button from "../components/button"; @@ -163,8 +163,8 @@ export default function CollectionPage() { )} {!collection.isPublic && ( - - {t("Private")} + + {t("Private")} )} @@ -344,15 +344,15 @@ function EditCollectionDialog({ onChange={(e) => setEditArticle(e.target.value)} disabled={editLoading} /> -