From 74ba8bf0b1c8a1f8b5c63e5e73236f40f2ee867f Mon Sep 17 00:00:00 2001 From: celine Date: Thu, 8 Jan 2026 15:02:42 -0500 Subject: [PATCH] added new preferences to props everywhere --- app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx | 6 +++++- app/lish/[did]/[publication]/[rkey]/PostPages.tsx | 12 ++++++++++-- app/lish/createPub/CreatePubForm.tsx | 11 +++++++++-- app/lish/createPub/UpdatePubForm.tsx | 11 +++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx b/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx index 402e72b2..222b46fa 100644 --- a/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx +++ b/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx @@ -202,7 +202,11 @@ const CanvasMetadata = (props: { isSubpage: boolean | undefined; data: PostPageData; profile: ProfileViewDetailed; - preferences: { showComments?: boolean }; + preferences: { + showComments?: boolean; + showMentions?: boolean; + showPrevNext?: boolean; + }; quotesCount: number | undefined; commentsCount: number | undefined; }) => { diff --git a/app/lish/[did]/[publication]/[rkey]/PostPages.tsx b/app/lish/[did]/[publication]/[rkey]/PostPages.tsx index 76e689c4..b8f93dcf 100644 --- a/app/lish/[did]/[publication]/[rkey]/PostPages.tsx +++ b/app/lish/[did]/[publication]/[rkey]/PostPages.tsx @@ -147,7 +147,11 @@ export type SharedPageProps = { document: PostPageData; did: string; profile: ProfileViewDetailed; - preferences: { showComments?: boolean }; + preferences: { + showComments?: boolean; + showMentions?: boolean; + showPrevNext?: boolean; + }; pubRecord?: PubLeafletPublication.Record; theme?: PubLeafletPublication.Theme | null; prerenderedCodeBlocks?: Map; @@ -206,7 +210,11 @@ export function PostPages({ did: string; prerenderedCodeBlocks?: Map; bskyPostData: AppBskyFeedDefs.PostView[]; - preferences: { showComments?: boolean }; + preferences: { + showComments?: boolean; + showMentions?: boolean; + showPrevNext?: boolean; + }; pollData: PollData[]; }) { let drawer = useDrawerOpen(document_uri); diff --git a/app/lish/createPub/CreatePubForm.tsx b/app/lish/createPub/CreatePubForm.tsx index 2d3f6655..5c7c8efb 100644 --- a/app/lish/createPub/CreatePubForm.tsx +++ b/app/lish/createPub/CreatePubForm.tsx @@ -53,7 +53,12 @@ export const CreatePubForm = () => { description: descriptionValue, iconFile: logoFile, subdomain: domainValue, - preferences: { showInDiscover, showComments: true }, + preferences: { + showInDiscover, + showComments: true, + showMentions: true, + showPrevNext: false, + }, }); if (!result.success) { @@ -68,7 +73,9 @@ export const CreatePubForm = () => { setTimeout(() => { setFormState("normal"); if (result.publication) - router.push(`${getBasePublicationURL(result.publication)}/dashboard`); + router.push( + `${getBasePublicationURL(result.publication)}/dashboard`, + ); }, 500); }} > diff --git a/app/lish/createPub/UpdatePubForm.tsx b/app/lish/createPub/UpdatePubForm.tsx index 6855ae85..5f109f0d 100644 --- a/app/lish/createPub/UpdatePubForm.tsx +++ b/app/lish/createPub/UpdatePubForm.tsx @@ -43,6 +43,15 @@ export const EditPubForm = (props: { ? true : record.preferences.showComments, ); + let showMentions = + record?.preferences?.showMentions === undefined + ? true + : record.preferences.showMentions; + let showPrevNext = + record?.preferences?.showPrevNext === undefined + ? true + : record.preferences.showPrevNext; + let [descriptionValue, setDescriptionValue] = useState( record?.description || "", ); @@ -74,6 +83,8 @@ export const EditPubForm = (props: { preferences: { showInDiscover: showInDiscover, showComments: showComments, + showMentions: showMentions, + showPrevNext: showPrevNext, }, }); toast({ type: "success", content: "Updated!" }); -- 2.51.2