From 3064866e2bf391bd2afcdeb22b600ad7f205324a Mon Sep 17 00:00:00 2001
From: Alex Gleason
Date: Thu, 18 Sep 2025 17:07:10 -0500
Subject: [PATCH 1/3] Add Nostr Settings page, move relay picker there
---
src/AppRouter.tsx | 2 +
src/components/SettingsLayout.tsx | 9 +++-
src/components/auth/AccountSwitcher.tsx | 44 +++++++++---------
src/pages/NostrSettings.tsx | 60 +++++++++++++++++++++++++
src/pages/Settings.tsx | 9 +++-
5 files changed, 100 insertions(+), 24 deletions(-)
create mode 100644 src/pages/NostrSettings.tsx
diff --git a/src/AppRouter.tsx b/src/AppRouter.tsx
index a328926f..848d8385 100644
--- a/src/AppRouter.tsx
+++ b/src/AppRouter.tsx
@@ -5,6 +5,7 @@ import { SessionMonitor } from "./components/SessionMonitor";
import Index from "./pages/Index";
import Clone from "./pages/Clone";
import Settings from "./pages/Settings";
+import NostrSettings from "./pages/NostrSettings";
import AISettings from "./pages/AISettings";
import GitSettings from "./pages/GitSettings";
import DataSettings from "./pages/DataSettings";
@@ -25,6 +26,7 @@ export function AppRouter() {
} />
}>
} />
+ } />
} />
} />
} />
diff --git a/src/components/SettingsLayout.tsx b/src/components/SettingsLayout.tsx
index ba10d48a..9e1edf0a 100644
--- a/src/components/SettingsLayout.tsx
+++ b/src/components/SettingsLayout.tsx
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { useNavigate, useLocation, Outlet } from 'react-router-dom';
import { Button } from '@/components/ui/button';
import { ScrollArea } from '@/components/ui/scroll-area';
-import { Menu, Bot, GitBranch, Database } from 'lucide-react';
+import { Menu, Bot, GitBranch, Database, Wifi } from 'lucide-react';
import { ProjectSidebar } from '@/components/ProjectSidebar';
import { useProjectsManager } from '@/hooks/useProjectsManager';
import { useIsMobile } from '@/hooks/useIsMobile';
@@ -33,6 +33,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',
diff --git a/src/components/auth/AccountSwitcher.tsx b/src/components/auth/AccountSwitcher.tsx
index 3a5b9901..92dce660 100644
--- a/src/components/auth/AccountSwitcher.tsx
+++ b/src/components/auth/AccountSwitcher.tsx
@@ -10,7 +10,6 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu.tsx';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar.tsx';
-import { RelaySelector } from '@/components/RelaySelector';
import { useLoggedInAccounts, type Account } from '@/hooks/useLoggedInAccounts';
import { genUserName } from '@/lib/genUserName';
import { useNavigate } from 'react-router-dom';
@@ -44,27 +43,28 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) {
- Switch Relay
-
-
- Switch Account
- {otherUsers.map((user) => (
- setLogin(user.id)}
- className='flex items-center gap-2 cursor-pointer p-2 rounded-md'
- >
-
-
- {getDisplayName(user)?.charAt(0) || }
-
-
-
{getDisplayName(user)}
-
- {user.id === currentUser.id && }
-
- ))}
-
+ {otherUsers.length > 0 && (
+ <>
+ Switch Account
+ {otherUsers.map((user) => (
+ setLogin(user.id)}
+ className='flex items-center gap-2 cursor-pointer p-2 rounded-md'
+ >
+
+
+ {getDisplayName(user)?.charAt(0) || }
+
+
+
{getDisplayName(user)}
+
+ {user.id === currentUser.id && }
+
+ ))}
+
+ >
+ )}
navigate('/settings')}
className='flex items-center gap-2 cursor-pointer p-2 rounded-md'
diff --git a/src/pages/NostrSettings.tsx b/src/pages/NostrSettings.tsx
new file mode 100644
index 00000000..88158877
--- /dev/null
+++ b/src/pages/NostrSettings.tsx
@@ -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 (
+
+ {isMobile && (
+
+
+
+
+
+ Nostr Settings
+
+
+ Configure your Nostr connection settings and relay preferences.
+
+
+
+ )}
+
+ {!isMobile && (
+
+
+
+ Nostr Settings
+
+
+ Configure your Nostr connection settings and relay preferences.
+
+
+ )}
+
+
+ {/* Relay Configuration */}
+
+
+
+
+
+
+ );
+}
+
+export default NostrSettings;
\ No newline at end of file
diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx
index 61477c7f..cff1c07e 100644
--- a/src/pages/Settings.tsx
+++ b/src/pages/Settings.tsx
@@ -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',
From 94f28d2ee8716ccea27b43964599c5828ef10f55 Mon Sep 17 00:00:00 2001
From: Alex Gleason
Date: Thu, 18 Sep 2025 17:17:23 -0500
Subject: [PATCH 2/3] Simplify Clone page
---
src/pages/Clone.tsx | 82 ++++++++++++++++++++-------------------------
1 file changed, 37 insertions(+), 45 deletions(-)
diff --git a/src/pages/Clone.tsx b/src/pages/Clone.tsx
index bfc18b94..7302e845 100644
--- a/src/pages/Clone.tsx
+++ b/src/pages/Clone.tsx
@@ -3,8 +3,6 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
import { AppLayout } from '@/components/AppLayout';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
-import { Card, CardContent } from '@/components/ui/card';
-import { Label } from '@/components/ui/label';
import { GitBranch, Loader2, AlertCircle } from 'lucide-react';
import { useProjectsManager } from '@/hooks/useProjectsManager';
import { useToast } from '@/hooks/useToast';
@@ -324,52 +322,46 @@ export default function Clone() {
-
-
-
-
-
{
- setRepoUrl(e.target.value);
- setError(null); // Clear error when user types
- }}
- onKeyDown={handleKeyDown}
- disabled={isCloning}
- className="text-base"
- />
+
+
{
+ setRepoUrl(e.target.value);
+ setError(null); // Clear error when user types
+ }}
+ onKeyDown={handleKeyDown}
+ disabled={isCloning}
+ />
+
+ {error && (
+
+ )}
- {error && (
-
+
+
);
From edb0cd580f5f53413acf6e310365250f5d856e10 Mon Sep 17 00:00:00 2001
From: Alex Gleason
Date: Thu, 18 Sep 2025 17:28:06 -0500
Subject: [PATCH 3/3] Remove relay picker from Anonymous
---
src/components/auth/LoginArea.tsx | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/components/auth/LoginArea.tsx b/src/components/auth/LoginArea.tsx
index e13d2d45..7be3feef 100644
--- a/src/components/auth/LoginArea.tsx
+++ b/src/components/auth/LoginArea.tsx
@@ -11,7 +11,6 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu.tsx';
import { Avatar, AvatarFallback } from '@/components/ui/avatar.tsx';
-import { RelaySelector } from '@/components/RelaySelector';
import LoginDialog from './LoginDialog';
import SignupDialog from './SignupDialog';
import { useLoggedInAccounts } from '@/hooks/useLoggedInAccounts';
@@ -54,9 +53,6 @@ export function LoginArea({ className }: LoginAreaProps) {
- Switch Relay
-
-
navigate('/settings')}
className='flex items-center gap-2 cursor-pointer p-2 rounded-md'