diff --git a/interface/app/$libraryId/settings/client/general.tsx b/interface/app/$libraryId/settings/client/general.tsx index 2a75fef9c..707cec6f7 100644 --- a/interface/app/$libraryId/settings/client/general.tsx +++ b/interface/app/$libraryId/settings/client/general.tsx @@ -29,7 +29,6 @@ export const Component = () => { const platform = usePlatform(); const debugState = useDebugState(); const editNode = useBridgeMutation('nodes.edit'); - const p2pSettingsEnabled = useFeatureFlag('p2pSettings'); const connectedPeers = useConnectedPeers(); const form = useZodForm({ @@ -171,79 +170,75 @@ export const Component = () => { onClick={() => (getDebugState().enabled = !debugState.enabled)} /> - {p2pSettingsEnabled && ( -
-

Networking

+
+

Networking

- -

- Allow your node to communicate with other Spacedrive nodes - around you -

-

- Required for library sync or - Spacedrop! -

- - } - > - {/* TODO: Switch doesn't handle optional fields correctly */} - - form.setValue('p2p_enabled', !form.getValues('p2p_enabled')) - } + +

+ Allow your node to communicate with other Spacedrive nodes around + you +

+

+ Required for library sync or + Spacedrop! +

+ + } + > + {/* TODO: Switch doesn't handle optional fields correctly */} + form.setValue('p2p_enabled', !form.getValues('p2p_enabled'))} + /> +
+ +
+ ( + + )} /> - - -
- ( - - )} - /> - { - form.setValue( - 'p2p_port', - Number(e.target.value.replace(/[^0-9]/g, '')) - ); - }} - /> -
-
-
- )} + { + form.setValue( + 'p2p_port', + Number(e.target.value.replace(/[^0-9]/g, '')) + ); + }} + /> +
+ +
); }; diff --git a/packages/client/src/hooks/useFeatureFlag.tsx b/packages/client/src/hooks/useFeatureFlag.tsx index 15c1a08f1..9b3d2aef3 100644 --- a/packages/client/src/hooks/useFeatureFlag.tsx +++ b/packages/client/src/hooks/useFeatureFlag.tsx @@ -5,7 +5,7 @@ import type { BackendFeature } from '../core'; import { valtioPersist } from '../lib/valito'; import { nonLibraryClient, useBridgeQuery } from '../rspc'; -export const features = ['spacedrop', 'p2pPairing', 'syncRoute', 'backups', 'p2pSettings'] as const; +export const features = ['spacedrop', 'p2pPairing', 'syncRoute', 'backups'] as const; // This defines which backend feature flags show up in the UI. // This is kinda a hack to not having the runtime array of possible features as Specta only exports the types.