a tool for shared writing and social publishing
0
fork

Configure Feed

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

lil thingys here and there

celine 52a883a9 6aa749dd

+28 -14
+1 -1
app/api/rpc/[command]/get_leaflet_data.ts
··· 17 17 `*, 18 18 permission_token_rights(*), 19 19 custom_domain_routes!custom_domain_routes_edit_permission_token_fkey(*), 20 - leaflets_in_publications(*, publications(*)) `, 20 + leaflets_in_publications(*, publications(*), documents(*)) `, 21 21 ) 22 22 .eq("id", token_id) 23 23 .single();
+1 -1
app/lish/[handle]/[publication]/dashboard/DraftList.tsx
··· 10 10 console.log({ pub_data }); 11 11 if (!pub_data) return null; 12 12 return ( 13 - <div className="flex flex-col gap-4 pb-6"> 13 + <div className="flex flex-col gap-4 pb-8 sm:pb-12"> 14 14 <NewDraftSecondaryButton fullWidth publication={pub_data?.name} /> 15 15 {pub_data.leaflets_in_publications.map((d) => { 16 16 return (
+1 -1
app/lish/[handle]/[publication]/dashboard/PublishedPostsLists.tsx
··· 21 21 </div> 22 22 ); 23 23 return ( 24 - <div className="publishedList w-full flex flex-col gap-4 pb-6"> 24 + <div className="publishedList w-full flex flex-col gap-4 pb-8 sm:pb-12"> 25 25 {publication.documents_in_publications.map((doc) => { 26 26 if (!doc.documents) return null; 27 27 let leaflet = publication.leaflets_in_publications.find(
+9 -8
app/lish/[handle]/[publication]/page.tsx
··· 88 88 {record.description}{" "} 89 89 </p> 90 90 <p className="text-sm text-tertiary pt-2"> 91 - {new Date(record.publishedAt).toLocaleDateString( 92 - undefined, 93 - { 94 - year: "numeric", 95 - month: "long", 96 - day: "2-digit", 97 - }, 98 - )}{" "} 91 + {record.publishedAt && 92 + new Date(record.publishedAt).toLocaleDateString( 93 + undefined, 94 + { 95 + year: "numeric", 96 + month: "long", 97 + day: "2-digit", 98 + }, 99 + )}{" "} 99 100 </p> 100 101 </Link> 101 102 </div>
+16 -3
components/Pages/PublicationMetadata.tsx
··· 10 10 import { Separator } from "components/Layout"; 11 11 import { AtUri } from "@atproto/syntax"; 12 12 import { PubLeafletDocument } from "lexicons/api"; 13 + import { publications } from "drizzle/schema"; 13 14 export const PublicationMetadata = ({ 14 15 cardBorderHidden, 15 16 }: { ··· 23 24 let [descriptionState, setDescriptionState] = useState( 24 25 pub?.description || "", 25 26 ); 27 + let record = pub.documents?.data as PubLeafletDocument.Record | null; 28 + let publishedAt = record?.publishedAt; 26 29 27 30 useEffect(() => { 28 31 setTitleState(pub?.title || ""); ··· 52 55 > 53 56 <div className="flex gap-2"> 54 57 <Link 55 - href={`/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${pub.publications.name}/dahsboard`} 58 + href={`/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${pub.publications.name}/dashboard`} 56 59 className="text-accent-contrast font-bold hover:no-underline" 57 60 > 58 61 {pub.publications?.name} ··· 79 82 /> 80 83 {pub.doc ? ( 81 84 <div className="flex flex-row items-center gap-2 pt-3"> 82 - <p className="text-sm text-tertiary">Published </p> 83 - 85 + <p className="text-sm text-tertiary"> 86 + Published{" "} 87 + {publishedAt && 88 + new Date(publishedAt).toLocaleString(undefined, { 89 + year: "numeric", 90 + month: "2-digit", 91 + day: "2-digit", 92 + hour: "2-digit", 93 + minute: "2-digit", 94 + hour12: true, 95 + })} 96 + </p> 84 97 <Separator classname="h-4" /> 85 98 <Link 86 99 target="_blank"