- {relayInfo.name || relayInfo.shortUrl}
+
+
+
+
+ {relayInfo.name || relayInfo.shortUrl}
+
+
{!!relayInfo.tags?.length && (
@@ -107,3 +112,33 @@ function formatSoftware(software: string) {
const parts = software.split('/')
return parts[parts.length - 1]
}
+
+function RelayControls({ url }: { url: string }) {
+ const [copiedUrl, setCopiedUrl] = useState(false)
+ const [copiedShareableUrl, setCopiedShareableUrl] = useState(false)
+
+ const handleCopyUrl = () => {
+ navigator.clipboard.writeText(url)
+ setCopiedUrl(true)
+ setTimeout(() => setCopiedUrl(false), 2000)
+ }
+
+ const handleCopyShareableUrl = () => {
+ navigator.clipboard.writeText(`https://jumble.social/?r=${url}`)
+ setCopiedShareableUrl(true)
+ toast.success('Shareable URL copied to clipboard')
+ setTimeout(() => setCopiedShareableUrl(false), 2000)
+ }
+
+ return (
+
+
+
+
+
+ )
+}
diff --git a/src/components/RelayPageControls/index.tsx b/src/components/RelayPageControls/index.tsx
deleted file mode 100644
index cb412879..00000000
--- a/src/components/RelayPageControls/index.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Button } from '@/components/ui/button'
-import { Check, Copy, Link } from 'lucide-react'
-import { useState } from 'react'
-import { toast } from 'sonner'
-import SaveRelayDropdownMenu from '../SaveRelayDropdownMenu'
-
-export default function RelayPageControls({ url }: { url: string }) {
- const [copiedUrl, setCopiedUrl] = useState(false)
- const [copiedShareableUrl, setCopiedShareableUrl] = useState(false)
-
- const handleCopyUrl = () => {
- navigator.clipboard.writeText(url)
- setCopiedUrl(true)
- setTimeout(() => setCopiedUrl(false), 2000)
- }
-
- const handleCopyShareableUrl = () => {
- navigator.clipboard.writeText(`https://jumble.social/?r=${url}`)
- setCopiedShareableUrl(true)
- toast.success('Shareable URL copied to clipboard')
- setTimeout(() => setCopiedShareableUrl(false), 2000)
- }
-
- return (
- <>
-
-
-
- >
- )
-}
diff --git a/src/components/SearchBar/index.tsx b/src/components/SearchBar/index.tsx
index aa2bc80c..89994624 100644
--- a/src/components/SearchBar/index.tsx
+++ b/src/components/SearchBar/index.tsx
@@ -1,7 +1,4 @@
-import Nip05 from '@/components/Nip05'
import SearchInput from '@/components/SearchInput'
-import UserAvatar from '@/components/UserAvatar'
-import Username from '@/components/Username'
import { useSearchProfiles } from '@/hooks'
import { toNote } from '@/lib/link'
import { randomString } from '@/lib/random'
@@ -23,7 +20,7 @@ import {
useState
} from 'react'
import { useTranslation } from 'react-i18next'
-import { UserItemSkeleton } from '../UserItem'
+import UserItem, { UserItemSkeleton } from '../UserItem'
const SearchBar = forwardRef<
TSearchBarRef,
@@ -154,7 +151,11 @@ const SearchBar = forwardRef<
}
/>
))}
- {isFetchingProfiles && profiles.length < 5 &&
}
+ {isFetchingProfiles && profiles.length < 5 && (
+
+
+
+ )}
{profiles.length >= 5 && (
- updateSearch({ type: 'profiles', search })}>
{t('Show more...')}
@@ -259,18 +260,8 @@ function ProfileIdItem({ id, onClick }: { id: string; onClick?: () => void }) {
function ProfileItem({ profile, onClick }: { profile: TProfile; onClick?: () => void }) {
return (
-
-
+
+
)
}
diff --git a/src/components/UserItem/index.tsx b/src/components/UserItem/index.tsx
index 1ace83d4..785655ff 100644
--- a/src/components/UserItem/index.tsx
+++ b/src/components/UserItem/index.tsx
@@ -3,10 +3,19 @@ import Nip05 from '@/components/Nip05'
import UserAvatar from '@/components/UserAvatar'
import Username from '@/components/Username'
import { Skeleton } from '@/components/ui/skeleton'
+import { cn } from '@/lib/utils'
-export default function UserItem({ pubkey }: { pubkey: string }) {
+export default function UserItem({
+ pubkey,
+ hideFollowButton,
+ className
+}: {
+ pubkey: string
+ hideFollowButton?: boolean
+ className?: string
+}) {
return (
-
+
-
+ {!hideFollowButton &&
}
)
}
diff --git a/src/pages/primary/RelayPage/index.tsx b/src/pages/primary/RelayPage/index.tsx
index f8e4471a..cb14e349 100644
--- a/src/pages/primary/RelayPage/index.tsx
+++ b/src/pages/primary/RelayPage/index.tsx
@@ -1,5 +1,4 @@
import Relay from '@/components/Relay'
-import RelayPageControls from '@/components/RelayPageControls'
import PrimaryPageLayout from '@/layouts/PrimaryPageLayout'
import { normalizeUrl, simplifyUrl } from '@/lib/url'
import { useCurrentRelays } from '@/providers/CurrentRelaysProvider'
@@ -32,14 +31,9 @@ export default RelayPage
function RelayPageTitlebar({ url }: { url?: string }) {
return (
-
-
-
-
{simplifyUrl(url ?? '')}
-
-
-
-
+
+
+
{simplifyUrl(url ?? '')}
)
}
diff --git a/src/pages/secondary/RelayPage/index.tsx b/src/pages/secondary/RelayPage/index.tsx
index 393d41d7..6c012407 100644
--- a/src/pages/secondary/RelayPage/index.tsx
+++ b/src/pages/secondary/RelayPage/index.tsx
@@ -1,5 +1,4 @@
import Relay from '@/components/Relay'
-import RelayPageControls from '@/components/RelayPageControls'
import SecondaryPageLayout from '@/layouts/SecondaryPageLayout'
import { normalizeUrl, simplifyUrl } from '@/lib/url'
import { forwardRef, useMemo } from 'react'
@@ -14,13 +13,7 @@ const RelayPage = forwardRef(({ url, index }: { url?: string; index?: number },
}
return (
-
}
- displayScrollToTopButton
- >
+
)
diff --git a/src/services/post-editor-cache.service.ts b/src/services/post-editor-cache.service.ts
index 5604d1ba..f2ac915e 100644
--- a/src/services/post-editor-cache.service.ts
+++ b/src/services/post-editor-cache.service.ts
@@ -6,7 +6,6 @@ type TPostSettings = {
isNsfw?: boolean
isPoll?: boolean
pollCreateData?: TPollCreateData
- specifiedRelayUrls?: string[]
addClientTag?: boolean
}