+
+ {props.leading && (
+
+ {props.leading}
+
+ )}
+
props.onChange(e.target.value)}
+ />
+
+ {props.loading ? : props.action}
- )}
-
props.onChange(e.target.value)}
- />
-
- {props.loading ? : props.action}
+ {props.publicationUrl && (
+
+
+
+
+
+ )}
);
};
diff --git a/components/Subscribe/HandleSubscribe.tsx b/components/Subscribe/HandleSubscribe.tsx
index 343273df..af7b2442 100644
--- a/components/Subscribe/HandleSubscribe.tsx
+++ b/components/Subscribe/HandleSubscribe.tsx
@@ -1,5 +1,5 @@
"use client";
-import { ButtonPrimary } from "components/Buttons";
+import { ButtonPrimary, ButtonSecondary } from "components/Buttons";
import { Popover } from "components/Popover";
import Link from "next/link";
import { useState } from "react";
@@ -14,6 +14,7 @@ import { Avatar } from "components/Avatar";
import { useIdentityData } from "components/IdentityProvider";
import { useRecordFromDid } from "src/utils/useRecordFromDid";
import { LinkIdentityModal } from "./LinkIdentityModal";
+import { RSSTiny } from "components/Icons/RSSTiny";
const apps = [
{ name: "Leaflet", logo: "https://leaflet.pub/logos/leaflet.svg" },
{ name: "Bluesky", logo: "https://leaflet.pub/logos/bluesky.svg" },
@@ -40,6 +41,7 @@ const apps = [
export const SubscribeWithHandle = (props: {
autoFocus?: boolean;
publicationUri: string;
+ publicationUrl?: string;
onSubscribed?: () => void;
onAtSuccess?: () => void;
leading?: React.ReactNode;
@@ -78,7 +80,7 @@ export const SubscribeWithHandle = (props: {
if (props.user.loggedIn && props.user.handle) {
return (
-
+
)}
+ {props.publicationUrl && (
+
+
+
+
+
+ )}
{oauthError && (
- {
- let trimmed = handle.trim();
- if (!trimmed) return;
- if (needsLinkConfirmation) {
- setPendingLinkHandle(trimmed);
- return;
- }
- setLoading(true);
- redirectToOauthForSubscribe(trimmed, false);
- }}
- action=
- Subscribe
-
- />
+
+
+
{
+ let trimmed = handle.trim();
+ if (!trimmed) return;
+ if (needsLinkConfirmation) {
+ setPendingLinkHandle(trimmed);
+ return;
+ }
+ setLoading(true);
+ redirectToOauthForSubscribe(trimmed, false);
+ }}
+ action=
+ Subscribe
+
+ />
+ {props.publicationUrl && (
+
+
+
+
+
+ )}
+
diff --git a/components/Subscribe/SubscribeButton.tsx b/components/Subscribe/SubscribeButton.tsx
index d8c11c67..a6defe88 100644
--- a/components/Subscribe/SubscribeButton.tsx
+++ b/components/Subscribe/SubscribeButton.tsx
@@ -173,6 +173,7 @@ export const SubscribeInput = (props: SubscribeProps) => {
Opt in to get updates via email!
{
{subscribeMode === "email" ? (
{
user={user}
autoFocus={props.autoFocus}
publicationUri={props.publicationUri}
+ publicationUrl={props.publicationUrl}
onAtSuccess={() => setAtSuccessOpen(true)}
leading={modeMenu}
/>
@@ -242,6 +245,7 @@ export const SubscribeInput = (props: SubscribeProps) => {
user={user}
autoFocus={props.autoFocus}
publicationUri={props.publicationUri}
+ publicationUrl={props.publicationUrl}
onSubscribed={() => setLocallySubscribed(true)}
/>
)}