a tool for shared writing and social publishing

some smaller styling fixes, better empty state for published list

+22 -10
+1 -1
app/lish/[handle]/[publication]/DraftList.tsx
··· 24 if (!rel?.isAuthor) return null; 25 return ( 26 <div className="flex flex-col gap-4"> 27 - <NewDraftSecondaryButton publication={props.publication} /> 28 {props.drafts.map((d) => { 29 return ( 30 <>
··· 24 if (!rel?.isAuthor) return null; 25 return ( 26 <div className="flex flex-col gap-4"> 27 + <NewDraftSecondaryButton fullWidth publication={props.publication} /> 28 {props.drafts.map((d) => { 29 return ( 30 <>
+5 -2
app/lish/[handle]/[publication]/NewDraftButton.tsx
··· 22 ); 23 } 24 25 - export function NewDraftSecondaryButton(props: { publication: string }) { 26 let router = useRouter(); 27 28 return ( 29 <ButtonSecondary 30 - fullWidth 31 id="new-leaflet-button" 32 onClick={async () => { 33 let newLeaflet = await createPublicationDraft(props.publication);
··· 22 ); 23 } 24 25 + export function NewDraftSecondaryButton(props: { 26 + publication: string; 27 + fullWidth?: boolean; 28 + }) { 29 let router = useRouter(); 30 31 return ( 32 <ButtonSecondary 33 + fullWidth={props.fullWidth} 34 id="new-leaflet-button" 35 onClick={async () => { 36 let newLeaflet = await createPublicationDraft(props.publication);
+1 -1
app/lish/[handle]/[publication]/PublicationDashboard.tsx
··· 32 function Tab(props: { name: string; selected: boolean; onSelect: () => void }) { 33 return ( 34 <div 35 - className={`border bg-bg-page border-b-0 px-2 pt-1 pb-0.5 rounded-t-md border-border ${props.selected ? "text-accent-1 font-bold -mb-[1px]" : ""}`} 36 onClick={() => props.onSelect()} 37 > 38 {props.name}
··· 32 function Tab(props: { name: string; selected: boolean; onSelect: () => void }) { 33 return ( 34 <div 35 + className={`pubTabs border bg-bg-page border-b-0 px-2 pt-1 pb-0.5 rounded-t-md border-border hover:cursor-pointer ${props.selected ? "text-accent-1 font-bold -mb-[1px]" : ""}`} 36 onClick={() => props.onSelect()} 37 > 38 {props.name}
+14 -5
app/lish/[handle]/[publication]/page.tsx
··· 1 import { IdResolver } from "@atproto/identity"; 2 import { supabaseServerClient } from "supabase/serverClient"; 3 import { Metadata } from "next"; 4 - import { Fact } from "src/replicache"; 5 - import { Attributes } from "src/replicache/attributes"; 6 - import { ActionButton } from "components/ActionBar/ActionButton"; 7 import { Sidebar } from "components/ActionBar/Sidebar"; 8 9 import { Media } from "components/Media"; 10 import { Footer } from "components/ActionBar/Footer"; 11 import { PublicationDashboard } from "./PublicationDashboard"; 12 import { DraftList } from "./DraftList"; 13 - import { NewDraftActionButton } from "./NewDraftButton"; 14 import { getIdentityData } from "actions/getIdentityData"; 15 import { ThemeProvider } from "components/ThemeManager/ThemeProvider"; 16 ··· 81 drafts={publication.leaflets_in_publications} 82 /> 83 ), 84 - Published: <div>none yet lol</div>, 85 }} 86 defaultTab={"Drafts"} 87 /> ··· 108 return ( 109 <> 110 <NewDraftActionButton publication={props.publication} /> 111 </> 112 ); 113 };
··· 1 import { IdResolver } from "@atproto/identity"; 2 import { supabaseServerClient } from "supabase/serverClient"; 3 import { Metadata } from "next"; 4 + 5 import { Sidebar } from "components/ActionBar/Sidebar"; 6 7 import { Media } from "components/Media"; 8 import { Footer } from "components/ActionBar/Footer"; 9 import { PublicationDashboard } from "./PublicationDashboard"; 10 import { DraftList } from "./DraftList"; 11 + import { 12 + NewDraftActionButton, 13 + NewDraftSecondaryButton, 14 + } from "./NewDraftButton"; 15 import { getIdentityData } from "actions/getIdentityData"; 16 import { ThemeProvider } from "components/ThemeManager/ThemeProvider"; 17 ··· 82 drafts={publication.leaflets_in_publications} 83 /> 84 ), 85 + Published: ( 86 + <div className="w-full container text-center place-items-center flex flex-col gap-3 p-3"> 87 + <div className="italic text-tertiary"> 88 + Nothing's been published yet... 89 + </div> 90 + <NewDraftSecondaryButton publication={publication.uri} /> 91 + </div> 92 + ), 93 }} 94 defaultTab={"Drafts"} 95 /> ··· 116 return ( 117 <> 118 <NewDraftActionButton publication={props.publication} /> 119 + 120 </> 121 ); 122 };
+1 -1
components/Pages/PublicationMetadata.tsx
··· 43 44 return ( 45 <div 46 - className={`flex flex-col px-3 sm:px-4 pb-4 sm:pb-4 ${cardBorderHidden ? "sm:pt-6 pt-0" : "sm:pt-4 pt-2"}`} 47 > 48 <Link 49 href={`/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${pub.publications.name}`}
··· 43 44 return ( 45 <div 46 + className={`flex flex-col px-3 sm:px-4 pb-4 sm:pb-4 ${cardBorderHidden ? "sm:pt-6 pt-0" : "sm:pt-3 pt-2"}`} 47 > 48 <Link 49 href={`/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${pub.publications.name}`}