From 3f2c3611d6f5f73f6022e50666e6013b60a3cda7 Mon Sep 17 00:00:00 2001
From: Jared Pereira
- Log in to collect all your Leaflets and access them on multiple
- devices
-
Sorry, can't resolve handle!
+Sorry, we can't find that handle!
This may be a glitch on our end. If the issue persists please{" "} send us a note. diff --git a/app/(home-pages)/reader/InboxContent.tsx b/app/(home-pages)/reader/InboxContent.tsx index 1c15d9c6..6d8f9169 100644 --- a/app/(home-pages)/reader/InboxContent.tsx +++ b/app/(home-pages)/reader/InboxContent.tsx @@ -109,7 +109,7 @@ export const InboxContent = (props: { export const ReaderEmpty = () => { return ( -
Sorry, can't resolve handle.
+Sorry, we can't find that handle!
This may be a glitch on our end. If the issue persists please{" "}
send us a note.
diff --git a/app/lish/[did]/[publication]/dashboard/page.tsx b/app/lish/[did]/[publication]/dashboard/page.tsx
index 6dfd25bb..4e9bfe4a 100644
--- a/app/lish/[did]/[publication]/dashboard/page.tsx
+++ b/app/lish/[did]/[publication]/dashboard/page.tsx
@@ -8,6 +8,7 @@ import { AtUri } from "@atproto/syntax";
import { NotFoundLayout } from "components/PageLayouts/NotFoundLayout";
import PublicationDashboard from "./PublicationDashboard";
import { normalizePublicationRecord } from "src/utils/normalizeRecords";
+import { LoginModal } from "components/LoginButton";
export async function generateMetadata(props: {
params: Promise<{ publication: string; did: string }>;
@@ -37,7 +38,16 @@ export default async function Publication(props: {
if (!identity || !identity.atp_did)
return (
Looks like you're not logged in.
+ Looks like you're not logged in.{" "}
+
If the issue persists please{" "}
send us a note.
diff --git a/app/lish/[did]/[publication]/dashboard/settings/DomainsInline.tsx b/app/lish/[did]/[publication]/dashboard/settings/DomainsInline.tsx
new file mode 100644
index 00000000..7e7a03f9
--- /dev/null
+++ b/app/lish/[did]/[publication]/dashboard/settings/DomainsInline.tsx
@@ -0,0 +1,371 @@
+"use client";
+
+import { useState } from "react";
+import { mutate } from "swr";
+import { useDomainStatus } from "components/Domains/useDomainStatus";
+import {
+ getDomainAssignment,
+ describeAssignment,
+} from "components/Domains/domainAssignment";
+import {
+ useIdentityData,
+ mutateIdentityData,
+} from "components/IdentityProvider";
+import { ButtonPrimary } from "components/Buttons";
+import {
+ usePublicationData,
+ useNormalizedPublicationRecord,
+} from "../PublicationSWRProvider";
+import { updatePublicationBasePath } from "app/lish/createPub/updatePublication";
+import {
+ assignDomainToPublication,
+ removeDomainAssignment,
+} from "actions/domains";
+import { PinTiny } from "components/Icons/PinTiny";
+import { LoadingTiny } from "components/Icons/LoadingTiny";
+import { UnlinkTiny } from "components/Icons/UnlinkTiny";
+import { DotLoader } from "components/utils/DotLoader";
+import { useToaster } from "components/Toast";
+import type { CustomDomain } from "components/Domains/DomainList";
+
+export const DomainsInline = () => {
+ let { data, mutate: mutatePubData } = usePublicationData();
+ let { publication: pubData } = data || {};
+ let record = useNormalizedPublicationRecord();
+ let { identity, mutate: mutateIdentity } = useIdentityData();
+ let toaster = useToaster();
+ let basePath = record?.url?.replace(/^https?:\/\//, "") || "";
+
+ let pubDomains = pubData?.publication_domains || [];
+ let pubDomainNames = new Set(pubDomains.map((d) => d.domain));
+
+ if (!pubData) return null;
+
+ return (
+
+ pending
+
+ This domain is currently assigned to{" "}
+ {describeAssignment(assignment)}. Assigning it here will remove that
+ assignment.
+ Linked Email
+ {props.user.email}
+
+ {props.user.handle}
+ Domains
+ This Publication's Domains
+
+ Available Domains
+ {(() => {
+ let availableDomains = (identity?.custom_domains || [])
+ .filter((d) => !pubDomainNames.has(d.domain))
+ .filter(
+ (d) =>
+ d.publication_domains.length === 0 &&
+ d.custom_domain_routes.length === 0,
+ );
+ return availableDomains.length > 0 ? (
+ <>
+ {availableDomains.map((d) => (
+
+ Add new domains from your profile settings!
+ You've Subscribed!
Log In or Sign Up
-
-
-
- on AT Proto
+
a new publication on AT Proto
+
+ Log in with
+
+ Atmosphere account
+
+
+ >
+ )}
+ >
+ ) : state === "email log in" ? (
+
+ ) : state === "email confirm" ? (
+
+ Leaflet is part of
+
+ the Atmosphere.
+ Confirm your email
+ Enter the code sent to
+ You've Subscribed!
+ You'll recieve new posts to
+ {props.email ? props.email : "your email"}
+ {!props.handle && (
+ <>
+
+ Welcome!
+
+ ) : (
+
+ )}
+
+ Link your universal handle
+
+
+
+ You've Subscribed!
+ You'll recieve new posts in the
+ Leaflet Reader
+
+
+ or any standard.site enabled reader!
+
+
+ Other ways to follow
+ Get the RSS Feed
+ Pin Custom Feed in Bluesky
+
+
+ {props.name}
+
Link your email
+
+