diff --git a/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx b/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx
index 12b30135..74e3763b 100644
--- a/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx
+++ b/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx
@@ -238,6 +238,7 @@ const CanvasMetadata = (props: {
data={props.data}
profile={props.profile}
preferences={props.preferences}
+ isCanvas
/>
>
diff --git a/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx b/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx
index f2645ef9..2c72bc0e 100644
--- a/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx
+++ b/app/lish/[did]/[publication]/[rkey]/Interactions/Interactions.tsx
@@ -140,19 +140,11 @@ export const Interactions = (props: {
- {/*COMMENT BUTTON*/}
- {props.showComments === false ? null : (
-
+ {props.showRecommends === false ? null : (
+
)}
{/*MENTIONS BUTTON*/}
@@ -171,14 +163,27 @@ export const Interactions = (props: {
{props.quotesCount}
)}
- {props.showRecommends === false ? null : (
-
+ {/*COMMENT BUTTON*/}
+ {props.showComments === false ? null : (
+
+ )}
+
+ {tagCount > 0 && (
+ <>
+ interactionsAvailable &&
+
+ >
)}
-
- {tagCount > 0 && }
);
};
diff --git a/app/lish/[did]/[publication]/[rkey]/PostHeader/PostHeader.tsx b/app/lish/[did]/[publication]/[rkey]/PostHeader/PostHeader.tsx
index 7a0f8ab0..1159683a 100644
--- a/app/lish/[did]/[publication]/[rkey]/PostHeader/PostHeader.tsx
+++ b/app/lish/[did]/[publication]/[rkey]/PostHeader/PostHeader.tsx
@@ -23,6 +23,7 @@ export function PostHeader(props: {
showMentions?: boolean;
showRecommends?: boolean;
};
+ isCanvas?: boolean;
}) {
let { identity } = useIdentityData();
let document = props.data;
@@ -88,16 +89,20 @@ export function PostHeader(props: {
>
) : null}
-
+ {!props.isCanvas && (
+
+ )}
>
}
/>
diff --git a/components/Canvas.tsx b/components/Canvas.tsx
index 0faa3302..118c163e 100644
--- a/components/Canvas.tsx
+++ b/components/Canvas.tsx
@@ -19,10 +19,11 @@ import { Popover } from "./Popover";
import { Separator } from "./Layout";
import { CommentTiny } from "./Icons/CommentTiny";
import { QuoteTiny } from "./Icons/QuoteTiny";
-import { PublicationMetadata } from "./Pages/PublicationMetadata";
+import { AddTags, PublicationMetadata } from "./Pages/PublicationMetadata";
import { useLeafletPublicationData } from "./PageSWRDataProvider";
import { useHandleCanvasDrop } from "./Blocks/useHandleCanvasDrop";
import { useBlockMouseHandlers } from "./Blocks/useBlockMouseHandlers";
+import { RecommendTinyEmpty } from "./Icons/RecommendTiny";
export function Canvas(props: {
entityID: string;
@@ -168,20 +169,34 @@ const CanvasMetadata = (props: { isSubpage: boolean | undefined }) => {
if (!normalizedPublication) return null;
let showComments = normalizedPublication.preferences?.showComments !== false;
let showMentions = normalizedPublication.preferences?.showMentions !== false;
+ let showRecommends =
+ normalizedPublication.preferences?.showRecommends !== false;
return (
+ {showRecommends && (
+
+ —
+
+ )}
{showComments && (
—
)}
- {showComments && (
+ {showMentions && (
—
)}
+ {showMentions !== false ||
+ showComments !== false ||
+ showRecommends === false ? (
+
+ ) : null}
+
+
{!props.isSubpage && (
<>
@@ -191,7 +206,7 @@ const CanvasMetadata = (props: { isSubpage: boolean | undefined }) => {
className="flex flex-col gap-2 p-0! max-w-sm w-[1000px]"
trigger={
}
>
-
+
>
)}
diff --git a/components/Pages/PublicationMetadata.tsx b/components/Pages/PublicationMetadata.tsx
index 3d2ef959..2caa7d15 100644
--- a/components/Pages/PublicationMetadata.tsx
+++ b/components/Pages/PublicationMetadata.tsx
@@ -20,10 +20,15 @@ import { TagSelector } from "components/Tags";
import { useIdentityData } from "components/IdentityProvider";
import { PostHeaderLayout } from "app/lish/[did]/[publication]/[rkey]/PostHeader/PostHeader";
import { Backdater } from "./Backdater";
+import { RecommendTinyEmpty } from "components/Icons/RecommendTiny";
-export const PublicationMetadata = () => {
+export const PublicationMetadata = (props: { noInteractions?: boolean }) => {
let { rep } = useReplicache();
- let { data: pub, normalizedDocument, normalizedPublication } = useLeafletPublicationData();
+ let {
+ data: pub,
+ normalizedDocument,
+ normalizedPublication,
+ } = useLeafletPublicationData();
let { identity } = useIdentityData();
let title = useSubscribe(rep, (tx) => tx.get
("publication_title"));
let description = useSubscribe(rep, (tx) =>
@@ -114,27 +119,37 @@ export const PublicationMetadata = () => {
) : (
Draft
)}
-
- {tags && (
- <>
-
- {normalizedPublication?.preferences?.showMentions !== false ||
- normalizedPublication?.preferences?.showComments !== false ? (
-
- ) : null}
- >
- )}
- {normalizedPublication?.preferences?.showMentions !== false && (
-
- —
-
- )}
- {normalizedPublication?.preferences?.showComments !== false && (
-
- —
-
- )}
-
+ {!props.noInteractions && (
+
+ {normalizedPublication?.preferences?.showRecommends !== false && (
+
+ —
+
+ )}
+
+ {normalizedPublication?.preferences?.showMentions !== false && (
+
+ —
+
+ )}
+ {normalizedPublication?.preferences?.showComments !== false && (
+
+ —
+
+ )}
+ {tags && (
+ <>
+ {normalizedPublication?.preferences?.showRecommends !==
+ false ||
+ normalizedPublication?.preferences?.showMentions !== false ||
+ normalizedPublication?.preferences?.showComments !== false ? (
+
+ ) : null}
+
+ >
+ )}
+
+ )}
>
}
/>
@@ -238,7 +253,7 @@ export const PublicationMetadataPreview = () => {
);
};
-const AddTags = () => {
+export const AddTags = () => {
let { data: pub, normalizedDocument } = useLeafletPublicationData();
let { rep } = useReplicache();
@@ -251,7 +266,10 @@ const AddTags = () => {
let tags: string[] = [];
if (Array.isArray(replicacheTags)) {
tags = replicacheTags;
- } else if (normalizedDocument?.tags && Array.isArray(normalizedDocument.tags)) {
+ } else if (
+ normalizedDocument?.tags &&
+ Array.isArray(normalizedDocument.tags)
+ ) {
tags = normalizedDocument.tags as string[];
}