props.onSelect()}
>
{props.name}
diff --git a/app/lish/[handle]/[publication]/page.tsx b/app/lish/[handle]/[publication]/page.tsx
index 264b26a5..504d6636 100644
--- a/app/lish/[handle]/[publication]/page.tsx
+++ b/app/lish/[handle]/[publication]/page.tsx
@@ -1,16 +1,17 @@
import { IdResolver } from "@atproto/identity";
import { supabaseServerClient } from "supabase/serverClient";
import { Metadata } from "next";
-import { Fact } from "src/replicache";
-import { Attributes } from "src/replicache/attributes";
-import { ActionButton } from "components/ActionBar/ActionButton";
+
import { Sidebar } from "components/ActionBar/Sidebar";
import { Media } from "components/Media";
import { Footer } from "components/ActionBar/Footer";
import { PublicationDashboard } from "./PublicationDashboard";
import { DraftList } from "./DraftList";
-import { NewDraftActionButton } from "./NewDraftButton";
+import {
+ NewDraftActionButton,
+ NewDraftSecondaryButton,
+} from "./NewDraftButton";
import { getIdentityData } from "actions/getIdentityData";
import { ThemeProvider } from "components/ThemeManager/ThemeProvider";
@@ -81,7 +82,14 @@ export default async function Publication(props: {
drafts={publication.leaflets_in_publications}
/>
),
- Published:
none yet lol
,
+ Published: (
+
+
+ Nothing's been published yet...
+
+
+
+ ),
}}
defaultTab={"Drafts"}
/>
@@ -108,6 +116,7 @@ const Actions = (props: { publication: string }) => {
return (
<>
+
>
);
};
diff --git a/components/Pages/PublicationMetadata.tsx b/components/Pages/PublicationMetadata.tsx
index c6c1fd19..095339c2 100644
--- a/components/Pages/PublicationMetadata.tsx
+++ b/components/Pages/PublicationMetadata.tsx
@@ -43,7 +43,7 @@ export const PublicationMetadata = ({
return (
Date: Thu, 15 May 2025 16:44:07 -0400
Subject: [PATCH 33/80] did my best with the pub footer
---
app/lish/[handle]/[publication]/Actions.tsx | 83 +++++++++++++++++++++
app/lish/[handle]/[publication]/page.tsx | 15 +---
app/lish/createPub/CreatePubForm.tsx | 2 +-
app/lish/createPub/page.tsx | 4 +-
components/HomeButton.tsx | 8 +-
components/Icons/SettingsSmall.tsx | 20 +++++
6 files changed, 114 insertions(+), 18 deletions(-)
create mode 100644 app/lish/[handle]/[publication]/Actions.tsx
create mode 100644 components/Icons/SettingsSmall.tsx
diff --git a/app/lish/[handle]/[publication]/Actions.tsx b/app/lish/[handle]/[publication]/Actions.tsx
new file mode 100644
index 00000000..0ac62fd8
--- /dev/null
+++ b/app/lish/[handle]/[publication]/Actions.tsx
@@ -0,0 +1,83 @@
+"use client";
+
+import { Media } from "components/Media";
+import { NewDraftActionButton } from "./NewDraftButton";
+import { HomeButton } from "components/HomeButton";
+import { ActionButton } from "components/ActionBar/ActionButton";
+import { useRouter } from "next/navigation";
+import { Popover } from "components/Popover";
+import { SettingsSmall } from "components/Icons/SettingsSmall";
+import { CreatePubForm } from "app/lish/createPub/CreatePubForm";
+import { ShareSmall } from "components/Icons/ShareSmall";
+import { Menu } from "components/Layout";
+import { MenuItem } from "components/Layout";
+import Link from "next/link";
+
+export const Actions = (props: { publication: string }) => {
+ return (
+ <>
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+function PublicationShareButton() {
+ return (
+
+ secondary
+ label="Share"
+ onClick={() => {}}
+ />
+ }
+ >
+
{}}>
+
+ Viewer Mode
+
+ View your publication as a reader would
+
+
+
+
{}}>
+
+
Share Your Publication
+
+ Copy the reader link for this publication{" "}
+
+
+
+
+ );
+}
+
+function PublicationSettingsButton(props: { publication: string }) {
+ let router = useRouter();
+
+ return (
+
+ label="Settings"
+ />
+ }
+ >
+
+
+ );
+}
diff --git a/app/lish/[handle]/[publication]/page.tsx b/app/lish/[handle]/[publication]/page.tsx
index 504d6636..5ff2af4b 100644
--- a/app/lish/[handle]/[publication]/page.tsx
+++ b/app/lish/[handle]/[publication]/page.tsx
@@ -8,12 +8,10 @@ import { Media } from "components/Media";
import { Footer } from "components/ActionBar/Footer";
import { PublicationDashboard } from "./PublicationDashboard";
import { DraftList } from "./DraftList";
-import {
- NewDraftActionButton,
- NewDraftSecondaryButton,
-} from "./NewDraftButton";
+import { NewDraftSecondaryButton } from "./NewDraftButton";
import { getIdentityData } from "actions/getIdentityData";
import { ThemeProvider } from "components/ThemeManager/ThemeProvider";
+import { Actions } from "./Actions";
const idResolver = new IdResolver();
@@ -111,12 +109,3 @@ export default async function Publication(props: {
const PubNotFound = () => {
return
ain't no pub here
;
};
-
-const Actions = (props: { publication: string }) => {
- return (
- <>
-
-
- >
- );
-};
diff --git a/app/lish/createPub/CreatePubForm.tsx b/app/lish/createPub/CreatePubForm.tsx
index 7d95eed7..47428f52 100644
--- a/app/lish/createPub/CreatePubForm.tsx
+++ b/app/lish/createPub/CreatePubForm.tsx
@@ -18,7 +18,7 @@ export const CreatePubForm = () => {
let { identity } = useIdentityData();
return (
diff --git a/components/HomeButton.tsx b/components/HomeButton.tsx
index a90f433c..b8265192 100644
--- a/components/HomeButton.tsx
+++ b/components/HomeButton.tsx
@@ -1,3 +1,4 @@
+"use client";
import Link from "next/link";
import { useEntitySetContext } from "./EntitySetProvider";
import { ActionButton } from "components/ActionBar/ActionButton";
@@ -8,12 +9,13 @@ import { addLeafletToHome } from "actions/addLeafletToHome";
import { useSmoker } from "./Toast";
import { AddToHomeSmall } from "./Icons/AddToHomeSmall";
import { HomeSmall } from "./Icons/HomeSmall";
+import { permission } from "process";
-export function HomeButton() {
+export function HomeButton(props: { isPublication?: boolean }) {
let { permissions } = useEntitySetContext();
let searchParams = useSearchParams();
- if (permissions.write)
+ if (permissions.write || props.isPublication)
return (
<>
} label="Go Home" />
-
+ {!props.isPublication &&
}
>
);
return null;
diff --git a/components/Icons/SettingsSmall.tsx b/components/Icons/SettingsSmall.tsx
new file mode 100644
index 00000000..4425981d
--- /dev/null
+++ b/components/Icons/SettingsSmall.tsx
@@ -0,0 +1,20 @@
+import { Props } from "./Props";
+
+export const SettingsSmall = (props: Props) => {
+ return (
+
+
+
+ );
+};
--
2.51.2
From 0ee9115e19e1d560ba8d992a2cd8e2dd3f558335 Mon Sep 17 00:00:00 2001
From: celine
Date: Thu, 15 May 2025 18:10:11 -0400
Subject: [PATCH 34/80] Added a action menu for post drafts
---
app/[leaflet_id]/Actions.tsx | 38 +++++++++++++++++++
app/[leaflet_id]/Footer.tsx | 25 +++++++++---
app/[leaflet_id]/Sidebar.tsx | 30 +++++++++++----
app/lish/[handle]/[publication]/Actions.tsx | 4 +-
app/lish/[handle]/[publication]/DraftList.tsx | 9 +++--
components/Icons/GoBackSmall.tsx | 18 +++++++++
components/Icons/PublishSmall.tsx | 20 ++++++++++
components/ShareOptions/index.tsx | 34 ++++++++++++++---
8 files changed, 153 insertions(+), 25 deletions(-)
create mode 100644 app/[leaflet_id]/Actions.tsx
create mode 100644 components/Icons/GoBackSmall.tsx
create mode 100644 components/Icons/PublishSmall.tsx
diff --git a/app/[leaflet_id]/Actions.tsx b/app/[leaflet_id]/Actions.tsx
new file mode 100644
index 00000000..ee5cdf69
--- /dev/null
+++ b/app/[leaflet_id]/Actions.tsx
@@ -0,0 +1,38 @@
+import { ActionButton } from "components/ActionBar/ActionButton";
+import { ArrowRightTiny } from "components/Icons/ArrowRightTiny";
+import { GoBackSmall } from "components/Icons/GoBackSmall";
+import { PublishSmall } from "components/Icons/PublishSmall";
+import { useIdentityData } from "components/IdentityProvider";
+import { publications } from "drizzle/schema";
+import Link from "next/link";
+export const BackToPubButton = (props: {
+ publication: {
+ identity_did: string;
+ indexed_at: string;
+ name: string;
+ uri: string;
+ };
+}) => {
+ let { identity } = useIdentityData();
+
+ let handle = identity?.resolved_did?.alsoKnownAs?.[0].slice(5)!;
+ let name = props.publication.name;
+ return (
+
+ }
+ label="To Pub"
+ />
+
+ );
+};
+
+export const PublishButton = () => {
+ return (
+ }
+ label="Publish!"
+ />
+ );
+};
diff --git a/app/[leaflet_id]/Footer.tsx b/app/[leaflet_id]/Footer.tsx
index 20fa60ec..e79fb51a 100644
--- a/app/[leaflet_id]/Footer.tsx
+++ b/app/[leaflet_id]/Footer.tsx
@@ -9,10 +9,14 @@ import { HomeButton } from "components/HomeButton";
import { useEntitySetContext } from "components/EntitySetProvider";
import { HelpPopover } from "components/HelpPopover";
import { Watermark } from "components/Watermark";
+import { BackToPubButton, PublishButton } from "./Actions";
+import { useLeafletPublicationData } from "components/PageSWRDataProvider";
export function LeafletFooter(props: { entityID: string }) {
let focusedBlock = useUIState((s) => s.focusedEntity);
let entity_set = useEntitySetContext();
+ let { data: publicationData } = useLeafletPublicationData();
+ let pub = publicationData?.[0];
return (
@@ -31,12 +35,21 @@ export function LeafletFooter(props: { entityID: string }) {
/>
) : entity_set.permissions.write ? (
-