a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

changed name of publication prop in notifcations, tweak to dropdown menu styling in settings

celine c76952a5 03decc67

+27 -22
+1 -1
app/(home-pages)/home/Actions/AccountSettings.tsx
··· 44 44 setState: (s: typeof props.state) => void; 45 45 }) => { 46 46 let menuItemClassName = 47 - "menuItem -mx-[8px] text-left flex items-center justify-between"; 47 + "menuItem -mx-[8px] text-left flex items-center justify-between hover:no-underline!"; 48 48 49 49 return ( 50 50 <div className="flex flex-col gap-0.5">
+7 -4
app/(home-pages)/notifications/CommentNotication.tsx
··· 14 14 ContentLayout, 15 15 Notification, 16 16 } from "./Notification"; 17 + import { AtUri } from "@atproto/api"; 17 18 18 19 export const CommentNotification = ( 19 20 props: { cardBorderHidden: boolean } & HydratedCommentNotification, ··· 27 28 profileRecord.displayName || 28 29 props.commentData.bsky_profiles?.handle || 29 30 "Someone"; 30 - const publication = 31 - props.commentData.documents?.documents_in_publications[0]?.publications || 32 - undefined; 31 + const pubRecord = props.commentData.documents?.documents_in_publications[0] 32 + ?.publications?.record as PubLeafletPublication.Record; 33 + let rkey = new AtUri(props.commentData.documents?.uri!).rkey; 34 + 33 35 return ( 34 36 <Notification 37 + href={`https://${pubRecord.base_path}/${rkey}?interactionDrawer=comments`} 35 38 cardBorderHidden={props.cardBorderHidden} 36 39 icon={<CommentTiny />} 37 40 actionText={<>{displayName} commented on your post</>} ··· 39 42 <ContentLayout 40 43 cardBorderHidden={props.cardBorderHidden} 41 44 postTitle={docRecord.title} 42 - publication={publication} 45 + pubRecord={pubRecord} 43 46 > 44 47 <CommentInNotification 45 48 className=""
+2 -2
app/(home-pages)/notifications/MentionNotification.tsx
··· 13 13 <ContentLayout 14 14 postTitle={"Post Title Here"} 15 15 cardBorderHidden={props.cardBorderHidden} 16 - publication={{ name: "My Publication" } as any} 16 + pubRecord={{ name: "My Publication" } as any} 17 17 > 18 18 I'm just gonna put the description here. The surrounding context is 19 19 just sort of a pain to figure out ··· 39 39 content={ 40 40 <ContentLayout 41 41 postTitle={"Post Title Here"} 42 - publication={{ name: "My Publication" } as any} 42 + pubRecord={{ name: "My Publication" } as any} 43 43 cardBorderHidden={props.cardBorderHidden} 44 44 > 45 45 <div>
+15 -13
app/(home-pages)/notifications/Notification.tsx
··· 1 1 import { Avatar } from "components/Avatar"; 2 2 import { BaseTextBlock } from "app/lish/[did]/[publication]/[rkey]/BaseTextBlock"; 3 3 import { PubLeafletPublication, PubLeafletRichtextFacet } from "lexicons/api"; 4 - import { useEntity, useReplicache } from "src/replicache"; 5 - import { PubIcon } from "components/ActionBar/Publications"; 6 - import { Json } from "supabase/database.types"; 7 4 8 5 export const Notification = (props: { 9 6 icon: React.ReactNode; 10 7 actionText: React.ReactNode; 11 8 content?: React.ReactNode; 12 9 cardBorderHidden?: boolean; 10 + href: string; 13 11 }) => { 14 12 return ( 15 13 <div 16 - className={`flex flex-col w-full ${ 14 + className={`relative flex flex-col w-full ${ 17 15 props.cardBorderHidden 18 16 ? "" 19 17 : " block-border border-border! hover:outline-border sm:p-4 px-3 pl-2 sm:pl-3 pt-2 sm:pt-3!" ··· 24 22 : "rgba(var(--bg-page), var(--bg-page-alpha))", 25 23 }} 26 24 > 25 + <a 26 + href={props.href} 27 + className=" absolute top-0 bottom-0 left-0 right-0" 28 + /> 27 29 <div className={`flex flex-row gap-2 items-center`}> 28 30 <div className="text-secondary shrink-0">{props.icon}</div> 29 31 <div className="text-secondary font-bold">{props.actionText}</div> ··· 41 43 export const ContentLayout = (props: { 42 44 children: React.ReactNode; 43 45 postTitle: string; 44 - publication?: { record: Json; uri: string }; 46 + pubRecord?: PubLeafletPublication.Record; 45 47 cardBorderHidden: boolean; 46 48 }) => { 47 - let pubRecord = props.publication?.record as PubLeafletPublication.Record; 48 - 49 49 return ( 50 50 <div 51 51 className={`border border-border-light rounded-md px-2 py-[6px] w-full ${props.cardBorderHidden ? "transparent" : "bg-bg-page"}`} ··· 54 54 {props.postTitle} 55 55 </div> 56 56 {props.children} 57 - {props.publication && ( 57 + {props.pubRecord && ( 58 58 <> 59 - <hr className="mt-3 mb-2 border-border-light" /> 60 - <div className="text-xs text-tertiary flex gap-[6px] items-center"> 61 - <PubIcon small record={pubRecord} uri={props.publication.uri} /> 62 - {pubRecord.name} 63 - </div> 59 + <hr className="mt-3 mb-1 border-border-light" /> 60 + <a 61 + href={`https://${props.pubRecord.base_path}`} 62 + className="relative text-xs text-tertiary flex gap-[6px] items-center font-bold hover:no-underline!" 63 + > 64 + {props.pubRecord.name} 65 + </a> 64 66 </> 65 67 )} 66 68 </div>
+1 -1
app/(home-pages)/notifications/ReplyNotification.tsx
··· 19 19 <ContentLayout 20 20 cardBorderHidden={props.cardBorderHidden} 21 21 postTitle="This is the Post Title" 22 - publication={{ name: "My Publication" } as any} 22 + pubRecord={{ name: "My Publication" } as any} 23 23 > 24 24 <CommentInNotification 25 25 className="text-tertiary italic line-clamp-1!"
+1 -1
app/lish/[did]/[publication]/dashboard/Actions.tsx
··· 144 144 setLoading: (l: boolean) => void; 145 145 }) => { 146 146 let menuItemClassName = 147 - "menuItem -mx-[8px] text-left flex items-center justify-between"; 147 + "menuItem -mx-[8px] text-left flex items-center justify-between hover:no-underline!"; 148 148 149 149 return ( 150 150 <div className="flex flex-col gap-0.5">