Add Nostr Settings page, move relay picker there

This commit is contained in:
Alex Gleason committed 2025-09-18 17:07:10 -05:00
1 parent 000c3d62ab
commit 3064866e2b
5 files changed
+100 -24

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
import { ArrowLeft, Wifi } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Label } from '@/components/ui/label';
import { RelaySelector } from '@/components/RelaySelector';
import { useIsMobile } from '@/hooks/useIsMobile';
import { useNavigate } from 'react-router-dom';
export function NostrSettings() {
const isMobile = useIsMobile();
const navigate = useNavigate();
return (
<div className="p-6 space-y-6">
{isMobile && (
<div className="space-y-3">
<Button
variant="ghost"
size="sm"
onClick={() => navigate('/settings')}
className="h-8 w-auto px-2 -ml-2"
>
<ArrowLeft className="h-4 w-4 mr-2" />
Back to Settings
</Button>
<div className="space-y-2">
<h1 className="text-2xl font-bold flex items-center gap-3">
<Wifi className="h-6 w-6 text-primary" />
Nostr Settings
</h1>
<p className="text-muted-foreground">
Configure your Nostr connection settings and relay preferences.
</p>
</div>
</div>
)}
{!isMobile && (
<div className="space-y-2">
<h1 className="text-2xl font-bold flex items-center gap-3">
<Wifi className="h-6 w-6 text-primary" />
Nostr Settings
</h1>
<p className="text-muted-foreground">
Configure your Nostr connection settings and relay preferences.
</p>
</div>
)}
<div className="space-y-6">
{/* Relay Configuration */}
<div className="grid gap-2">
<Label htmlFor="relay-selector">Selected Relay</Label>
<RelaySelector className="w-full max-w-md" />
</div>
</div>
</div>
);
}
export default NostrSettings;
+8 -1
View File
@@ -1,5 +1,5 @@
import { useNavigate } from 'react-router-dom';
import { Bot, GitBranch, Database } from 'lucide-react';
import { Bot, GitBranch, Database, Wifi } from 'lucide-react';
import { useIsMobile } from '@/hooks/useIsMobile';
interface SettingsItem {
@@ -25,6 +25,13 @@ const settingsItems: SettingsItem[] = [
icon: GitBranch,
href: '/settings/git',
},
{
id: 'nostr',
title: 'Nostr Settings',
description: 'Configure relay connections and Nostr preferences',
icon: Wifi,
href: '/settings/nostr',
},
{
id: 'data',
title: 'Data',