diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index a97ec6a6..95ae9181 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -9,7 +9,6 @@ import LayoutNavigationSettings from './Settings/LayoutNavigationSettings' import StartupPreferencesSettings from './Settings/StartupPreferencesSettings' import ZapSettings from './Settings/ZapSettings' import RelaySettings from './Settings/RelaySettings' -import RelayRebroadcastSettings from './Settings/RelayRebroadcastSettings' import { useRelayStatus } from '../hooks/useRelayStatus' const DEFAULT_SETTINGS: UserSettings = { @@ -162,8 +161,7 @@ const Settings: React.FC = ({ settings, onSave, onClose, relayPoo - - + ) diff --git a/src/components/Settings/RelayRebroadcastSettings.tsx b/src/components/Settings/RelayRebroadcastSettings.tsx deleted file mode 100644 index eee0a5b6..00000000 --- a/src/components/Settings/RelayRebroadcastSettings.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faPlane, faGlobe, faInfoCircle } from '@fortawesome/free-solid-svg-icons' -import { UserSettings } from '../../services/settingsService' - -interface RelayRebroadcastSettingsProps { - settings: UserSettings - onUpdate: (updates: Partial) => void -} - -const RelayRebroadcastSettings: React.FC = ({ - settings, - onUpdate -}) => { - return ( -
-

Relay Rebroadcast

- -
- -
- -
- -
- -
- -
- Why rebroadcast? Rebroadcasting helps preserve content and makes it available - on more relays. Local caching ensures you can access your bookmarks and highlights even when offline. -
-
-
- ) -} - -export default RelayRebroadcastSettings - diff --git a/src/components/Settings/RelaySettings.tsx b/src/components/Settings/RelaySettings.tsx index f71f1597..894d4950 100644 --- a/src/components/Settings/RelaySettings.tsx +++ b/src/components/Settings/RelaySettings.tsx @@ -1,17 +1,20 @@ import React from 'react' import { useNavigate } from 'react-router-dom' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faCheckCircle, faCircle, faClock, faPlane } from '@fortawesome/free-solid-svg-icons' +import { faCheckCircle, faCircle, faClock, faPlane, faGlobe } from '@fortawesome/free-solid-svg-icons' import { RelayStatus } from '../../services/relayStatusService' import { formatDistanceToNow } from 'date-fns' import { isLocalRelay } from '../../utils/helpers' +import { UserSettings } from '../../services/settingsService' interface RelaySettingsProps { relayStatuses: RelayStatus[] + settings: UserSettings + onUpdate: (updates: Partial) => void onClose?: () => void } -const RelaySettings: React.FC = ({ relayStatuses, onClose }) => { +const RelaySettings: React.FC = ({ relayStatuses, settings, onUpdate, onClose }) => { const navigate = useNavigate() const activeRelays = relayStatuses.filter(r => r.isInPool) const recentRelays = relayStatuses.filter(r => !r.isInPool) @@ -37,6 +40,44 @@ const RelaySettings: React.FC = ({ relayStatuses, onClose })

Relays

+
+ +
+ +
+ +
+ {activeRelays.length > 0 && (