diff --git a/actions/publishToPublication.ts b/actions/publishToPublication.ts index 288b0d91..d87d2f68 100644 --- a/actions/publishToPublication.ts +++ b/actions/publishToPublication.ts @@ -542,6 +542,9 @@ async function processBlocksToPages( let record: PubLeafletBlocksUnorderedList.ListItem = { $type: "pub.leaflet.blocks.unorderedList#listItem", content, + ...(child.block.listData?.checklist && { + checked: child.block.listData.checked ?? false, + }), }; let sameStyle = child.children.filter( (c) => c.block.listData?.listStyle !== "ordered", @@ -576,6 +579,9 @@ async function processBlocksToPages( let record: PubLeafletBlocksOrderedList.ListItem = { $type: "pub.leaflet.blocks.orderedList#listItem", content, + ...(child.block.listData?.checklist && { + checked: child.block.listData.checked ?? false, + }), }; let sameStyle = child.children.filter( (c) => c.block.listData?.listStyle === "ordered", diff --git a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx index 1c8f1b19..c07a5b96 100644 --- a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx +++ b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx @@ -36,6 +36,8 @@ import { ButtonPrimary } from "components/Buttons"; import { blockTextSize } from "src/utils/blockTextSize"; import { slugify } from "src/utils/slugify"; import { PostNotAvailable } from "components/Blocks/BlueskyPostBlock/BlueskyEmbed"; +import { CheckboxChecked } from "components/Icons/CheckboxChecked"; +import { CheckboxEmpty } from "components/Icons/CheckboxEmpty"; export function PostContent({ blocks, @@ -487,11 +489,17 @@ function ListItem(props: { ))} ) : null; + let isChecklist = props.item.checked !== undefined; return (