Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/components/ProfileDataCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Separator } from '@/components/ui/separator';
import { CalendarIcon, UserIcon, TagIcon, BookmarkIcon, RadioIcon, PinIcon, Users2Icon, HashIcon, SmileIcon, SearchIcon, MessageCircleIcon, BanIcon, DatabaseIcon, Share2Icon, ShieldCheckIcon } from 'lucide-react';
import { CalendarIcon, UserIcon, TagIcon, BookmarkIcon, RadioIcon, PinIcon, Users2Icon, HashIcon, SmileIcon, SearchIcon, MessageCircleIcon, BanIcon, DatabaseIcon, Share2Icon, ShieldCheckIcon, ServerIcon } from 'lucide-react';
import type { NostrEvent, NostrMetadata } from '@nostrify/nostrify';
import type { ProfileData } from '@/hooks/useProfileData';

Expand Down Expand Up @@ -63,6 +63,8 @@ export function ProfileDataCard({ profileData, relayUrl, onSelectEvents, selecte
return { name: 'Emoji List', icon: SmileIcon, color: 'bg-pink-500/20 border-pink-500/30 text-pink-400' };
case 10050:
return { name: 'DM Relays', icon: MessageCircleIcon, color: 'bg-violet-500/20 border-violet-500/30 text-violet-400' };
case 10063:
return { name: 'Blossom Servers', icon: ServerIcon, color: 'bg-emerald-500/20 border-emerald-500/30 text-emerald-400' };
case 10086:
return { name: 'Indexer Relays', icon: DatabaseIcon, color: 'bg-blue-500/20 border-blue-500/30 text-blue-400' };
case 10087:
Expand Down Expand Up @@ -117,6 +119,9 @@ export function ProfileDataCard({ profileData, relayUrl, onSelectEvents, selecte
} else if (event.kind === 10050) {
const dmRelayTags = event.tags.filter(tag => tag[0] === 'relay');
details = `${dmRelayTags.length} DM relays`;
} else if (event.kind === 10063) {
const serverTags = event.tags.filter(tag => tag[0] === 'server');
details = `${serverTags.length} Blossom server${serverTags.length !== 1 ? 's' : ''}`;
} else if (event.kind === 10006) {
const blockedRelayTags = event.tags.filter(tag => tag[0] === 'relay');
details = `${blockedRelayTags.length} blocked relays`;
Expand Down
6 changes: 4 additions & 2 deletions src/components/auth/LoginDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { QRCodeSVG } from 'qrcode.react';
import { Shield, Upload, AlertTriangle, UserPlus, KeyRound, Sparkles, Link, Loader2, Copy, Check, ChevronDown, ChevronUp, ExternalLink } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Dialog, DialogContent, DialogHeader, DialogDescription } from "@/components/ui/dialog";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog";
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { Alert, AlertDescription } from '@/components/ui/alert';
import { useLoginActions, generateNostrConnectParams, generateNostrConnectURI, NostrConnectParams } from '@/hooks/useLoginActions';
Expand Down Expand Up @@ -266,7 +266,9 @@ const LoginDialog: React.FC<LoginDialogProps> = ({ isOpen, onClose, onLogin, onS
className={cn("max-w-[95vw] sm:max-w-md max-h-[90vh] max-h-[90dvh] p-0 overflow-hidden rounded-2xl overflow-y-scroll")}
>
<DialogHeader className={cn('px-6 pt-6 pb-1 relative')}>

<DialogTitle className="sr-only">
Sign In or Sign Up
</DialogTitle>
<DialogDescription className="text-center">
Sign up or log in to continue
</DialogDescription>
Expand Down
3 changes: 2 additions & 1 deletion src/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Command as CommandPrimitive } from "cmdk"
import { Search } from "lucide-react"

import { cn } from "@/lib/utils"
import { Dialog, DialogContent } from "@/components/ui/dialog"
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"

const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
Expand All @@ -27,6 +27,7 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0 shadow-lg">
<DialogTitle className="sr-only">Command Menu</DialogTitle>
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
Expand Down
11 changes: 9 additions & 2 deletions src/hooks/useProfileData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface ProfileData {
searchRelays?: NostrEvent;
dmRelays?: NostrEvent;
blockedRelays?: NostrEvent;
blossomServers?: NostrEvent;
indexerRelays?: NostrEvent;
proxyRelays?: NostrEvent;
broadcastRelays?: NostrEvent;
Expand Down Expand Up @@ -45,7 +46,7 @@ export function useProfileData(pubkey: string | undefined, relayUrl: string) {
// If the global instance works, use it for all queries
const allEvents = await nostr.query(
[{
kinds: [0, 3, 10000, 10001, 10002, 10003, 10004, 10006, 10007, 10015, 10030, 10050, 10086, 10087, 10088, 10089],
kinds: [0, 3, 10000, 10001, 10002, 10003, 10004, 10006, 10007, 10015, 10030, 10050, 10063, 10086, 10087, 10088, 10089],
authors: [pubkey],
limit: 50
}],
Expand Down Expand Up @@ -92,6 +93,9 @@ export function useProfileData(pubkey: string | undefined, relayUrl: string) {
case 10050:
profileData.dmRelays = event;
break;
case 10063:
profileData.blossomServers = event;
break;
case 10086:
profileData.indexerRelays = event;
break;
Expand Down Expand Up @@ -125,7 +129,7 @@ export function useProfileData(pubkey: string | undefined, relayUrl: string) {
});

const events = await customPool.query(
[{ kinds: [0, 3, 10000, 10001, 10002, 10003, 10004, 10006, 10007, 10015, 10030, 10050, 10086, 10087, 10088, 10089], authors: [pubkey], limit: 50 }],
[{ kinds: [0, 3, 10000, 10001, 10002, 10003, 10004, 10006, 10007, 10015, 10030, 10050, 10063, 10086, 10087, 10088, 10089], authors: [pubkey], limit: 50 }],
{ signal }
);

Expand Down Expand Up @@ -170,6 +174,9 @@ export function useProfileData(pubkey: string | undefined, relayUrl: string) {
case 10050:
profileData.dmRelays = event;
break;
case 10063:
profileData.blossomServers = event;
break;
case 10086:
profileData.indexerRelays = event;
break;
Expand Down
Loading