From 5587d4068813eb8c444389087beb44dcfe20979d Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 11 Jun 2026 17:50:47 -0700 Subject: [PATCH] Show plan on relay detail header --- frontend/src/components/RelayListItem.tsx | 6 +++--- frontend/src/components/relay/RelayCardHeader.tsx | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/RelayListItem.tsx b/frontend/src/components/RelayListItem.tsx index 378bf44..df03a16 100644 --- a/frontend/src/components/RelayListItem.tsx +++ b/frontend/src/components/RelayListItem.tsx @@ -2,7 +2,7 @@ import { A } from "@solidjs/router" import { Show } from "solid-js" import { getProfilePicture } from "applesauce-core/helpers/profile" import type { Relay } from "@/lib/api" -import { StatusBadge } from "@/components/relay/RelayCardHeader" +import { PlanBadge, StatusBadge } from "@/components/relay/RelayCardHeader" import { useProfileMetadata } from "@/lib/hooks" import { shortenPubkey } from "@/lib/pubkey" import { RELAY_DOMAIN } from "@/lib/subdomain" @@ -42,7 +42,7 @@ export default function RelayListItem(props: RelayListItemProps) { -
+
} @@ -54,7 +54,7 @@ export default function RelayListItem(props: RelayListItemProps) { Failed to sync - {props.relay.plan_id} +
diff --git a/frontend/src/components/relay/RelayCardHeader.tsx b/frontend/src/components/relay/RelayCardHeader.tsx index 7e0ef08..5fa7aa2 100644 --- a/frontend/src/components/relay/RelayCardHeader.tsx +++ b/frontend/src/components/relay/RelayCardHeader.tsx @@ -21,6 +21,17 @@ export function StatusBadge(props: { status: string }) { ) } +export function PlanBadge(props: { planId: string }) { + const styles = () => props.planId === "free" + ? "bg-gray-100 text-gray-500 border-gray-200" + : "bg-blue-50 text-blue-700 border-blue-200" + return ( + + {props.planId} + + ) +} + // Presentational header for RelayDetailCard: icon/title/status, the WSS link, the // optional tenant profile link, the sync_error banner, and the actions dropdown. // The dropdown owns its own open/close UI state and document listeners; all relay @@ -82,6 +93,7 @@ export default function RelayCardHeader(props: RelayCardHeaderProps) {

{r().info_name || r().subdomain}

+