{
}
- rules={[
- { required: true, message: 'Please enter the relay name' }
- ]}
+ rules={[{ required: true, message: 'Please enter the relay name' }]}
>
- }
- placeholder="My Nostr Relay"
- />
+ } placeholder="My Nostr Relay" />
{
}
>
-
+
{
}
>
- }
- placeholder="admin@example.com"
- />
+ } placeholder="admin@example.com" />
{
}
- rules={[
- { required: true, message: 'Please enter the relay public key' }
- ]}
+ rules={[{ required: true, message: 'Please enter the relay public key' }]}
>
- }
- placeholder="npub..."
- />
+ } placeholder="npub..." />
{
}
>
- }
- placeholder="DHT key"
- />
+ } placeholder="DHT key" />
{
}
>
-
+
{
}
>
-
+
{
return isNaN(num) ? null : num;
})
.filter((val: number | null): val is number => val !== null);
-
+
// Update the form field with number values
form.setFieldsValue({ relaysupportednips: numberValues });
}}
>
- {nipOptions.map(option => (
+ {nipOptions.map((option) => (
@@ -235,16 +200,18 @@ const RelayInfoSettings: React.FC = () => {
-
- Note: This information will be publicly available to clients connecting to your relay.
- It helps users understand the capabilities and ownership of your relay.
+
+ Note: This information will be publicly available to
+ clients connecting to your relay. It helps users understand the capabilities and ownership of your relay.
Basic Mode: Only detects genitals, anus, and exposed breasts. Fastest processing (no Llama Vision). Best for high-volume applications.
-
Strict Mode: Includes all "basic" detection plus automatic blocking of all detected buttocks. Fast processing. Best for zero-tolerance platforms.
-
Full Mode (Default): Complete analysis with contextual evaluation. Slower due to Llama Vision, but most accurate. Reduces false positives.
+
+ Basic Mode: Only detects genitals, anus, and exposed breasts. Fastest processing (no
+ Llama Vision). Best for high-volume applications.
+
+
+ Strict Mode: Includes all "basic" detection plus automatic blocking of all
+ detected buttocks. Fast processing. Best for zero-tolerance platforms.
+
+
+ Full Mode (Default): Complete analysis with contextual evaluation. Slower due to Llama
+ Vision, but most accurate. Reduces false positives.
+
@@ -121,10 +119,7 @@ const ImageModerationSettings: React.FC = () => {
-
+
@@ -140,15 +135,10 @@ const ImageModerationSettings: React.FC = () => {
}
rules={[
{ required: true, message: 'Please enter a threshold value' },
- { type: 'number', min: 0, max: 1, message: 'Value must be between 0 and 1' }
+ { type: 'number', min: 0, max: 1, message: 'Value must be between 0 and 1' },
]}
>
-
+ {
label="Check Interval (seconds)"
rules={[
{ required: true, message: 'Please enter a check interval' },
- { type: 'number', min: 1, message: 'Value must be at least 1' }
+ { type: 'number', min: 1, message: 'Value must be at least 1' },
]}
>
-
+ {
label="Concurrency"
rules={[
{ required: true, message: 'Please enter a concurrency value' },
- { type: 'number', min: 1, message: 'Value must be at least 1' }
+ { type: 'number', min: 1, message: 'Value must be at least 1' },
]}
>
-
+ {
label="Timeout (seconds)"
rules={[
{ required: true, message: 'Please enter a timeout value' },
- { type: 'number', min: 1, message: 'Value must be at least 1' }
+ { type: 'number', min: 1, message: 'Value must be at least 1' },
]}
>
-
+
diff --git a/src/components/settings/OllamaSettings.tsx b/src/components/settings/OllamaSettings.tsx
index 29ce229f..a346f940 100644
--- a/src/components/settings/OllamaSettings.tsx
+++ b/src/components/settings/OllamaSettings.tsx
@@ -1,10 +1,10 @@
import React, { useEffect, useState } from 'react';
-import { Form, Input, InputNumber, Select, Tooltip } from 'antd';
+import { Form, Select, Tooltip } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import useGenericSettings from '@app/hooks/useGenericSettings';
import { SettingsGroupType } from '@app/types/settings.types';
import BaseSettingsForm from './BaseSettingsForm';
-import { InputField } from './Settings.styles';
+import { InputField, InputNumberField } from './Settings.styles';
const { Option } = Select;
@@ -162,7 +162,7 @@ const OllamaSettings: React.FC = () => {
{ type: 'number', min: 1, message: 'Value must be at least 1' }
]}
>
-
+
diff --git a/src/components/settings/SettingsPage.tsx b/src/components/settings/SettingsPage.tsx
index fc389a59..537e44e4 100644
--- a/src/components/settings/SettingsPage.tsx
+++ b/src/components/settings/SettingsPage.tsx
@@ -123,7 +123,6 @@ const SettingsWrapper = styled.div`
.ant-input, .ant-input-number, .ant-select-selector {
background-color: var(--input-bg-color) !important;
- border: 1px solid var(--border-base-color) !important;
}
`;
From 79f33e92f0717c937236f0f79dfaca88e245c550 Mon Sep 17 00:00:00 2001
From: TONE-E <90010906+AnthonyMarin@users.noreply.github.com>
Date: Wed, 25 Jun 2025 12:59:23 -0700
Subject: [PATCH 11/17] create styling for select component
---
src/components/settings/Settings.styles.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/components/settings/Settings.styles.ts b/src/components/settings/Settings.styles.ts
index c25f6543..f680165f 100644
--- a/src/components/settings/Settings.styles.ts
+++ b/src/components/settings/Settings.styles.ts
@@ -1,5 +1,5 @@
import styled from 'styled-components';
-import { Input, InputNumber } from 'antd';
+import { Input, InputNumber, Select } from 'antd';
export const InputField = styled(Input)`
border-radius: 7px !important;
@@ -60,3 +60,9 @@ export const InputNumberField = styled(InputNumber)`
color: var(--text-main-color) !important;
opacity: 0.7 !important;}
`;
+
+export const SelectField = styled(Select)`
+ .ant-select-arrow, .ant-select-clear{
+ color: var(--text-main-color) !important;
+ }
+`
From 8088ee7588833adb8bf0868d58d9312d15b59d92 Mon Sep 17 00:00:00 2001
From: TONE-E <90010906+AnthonyMarin@users.noreply.github.com>
Date: Wed, 25 Jun 2025 13:05:38 -0700
Subject: [PATCH 12/17] replace select fields with styled components
---
src/components/settings/ImageModerationSettings.tsx | 8 ++++----
src/components/settings/OllamaSettings.tsx | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/components/settings/ImageModerationSettings.tsx b/src/components/settings/ImageModerationSettings.tsx
index 4e620391..3de2e57d 100644
--- a/src/components/settings/ImageModerationSettings.tsx
+++ b/src/components/settings/ImageModerationSettings.tsx
@@ -1,11 +1,11 @@
import React, { useEffect, useState } from 'react';
-import { Form, Switch, Select, Tooltip } from 'antd';
+import { Form, Switch, Tooltip } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import useGenericSettings from '@app/hooks/useGenericSettings';
import { ImageModerationSettings as ImageModerationSettingsType, SettingsGroupType } from '@app/types/settings.types';
import BaseSettingsForm from './BaseSettingsForm';
import * as S from './Settings.styles';
-const { Option } = Select;
+const { Option } = S.SelectField;
const ImageModerationSettings: React.FC = () => {
const { settings, loading, error, fetchSettings, updateSettings, saveSettings } =
@@ -79,11 +79,11 @@ const ImageModerationSettings: React.FC = () => {
}
>
-
+
-
+
diff --git a/src/components/settings/OllamaSettings.tsx b/src/components/settings/OllamaSettings.tsx
index a346f940..3c37515a 100644
--- a/src/components/settings/OllamaSettings.tsx
+++ b/src/components/settings/OllamaSettings.tsx
@@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react';
-import { Form, Select, Tooltip } from 'antd';
+import { Form, Tooltip } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import useGenericSettings from '@app/hooks/useGenericSettings';
import { SettingsGroupType } from '@app/types/settings.types';
import BaseSettingsForm from './BaseSettingsForm';
-import { InputField, InputNumberField } from './Settings.styles';
+import { InputField, InputNumberField, SelectField } from './Settings.styles';
-const { Option } = Select;
+const { Option } = SelectField;
const OllamaSettings: React.FC = () => {
const {
@@ -131,7 +131,7 @@ const OllamaSettings: React.FC = () => {
{ required: true, message: 'Please select an Ollama model' }
]}
>
- {
{option.label}
))}
-
+
Date: Wed, 25 Jun 2025 15:16:31 -0700
Subject: [PATCH 13/17] basic upload field
---
src/components/settings/Settings.styles.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/components/settings/Settings.styles.ts b/src/components/settings/Settings.styles.ts
index f680165f..3ef78c73 100644
--- a/src/components/settings/Settings.styles.ts
+++ b/src/components/settings/Settings.styles.ts
@@ -1,5 +1,5 @@
import styled from 'styled-components';
-import { Input, InputNumber, Select } from 'antd';
+import { Input, InputNumber, Select, Button} from 'antd';
export const InputField = styled(Input)`
border-radius: 7px !important;
@@ -66,3 +66,6 @@ export const SelectField = styled(Select)`
color: var(--text-main-color) !important;
}
`
+export const UploadButton = styled(Button)`
+ margin-right:.5rem;
+`;
\ No newline at end of file
From 0f91f9f5023bf174be9b2464de9ab31c81cd17e5 Mon Sep 17 00:00:00 2001
From: TONE-E <90010906+AnthonyMarin@users.noreply.github.com>
Date: Wed, 25 Jun 2025 15:16:44 -0700
Subject: [PATCH 14/17] place upload field for images
---
src/components/settings/RelayInfoSettings.tsx | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/components/settings/RelayInfoSettings.tsx b/src/components/settings/RelayInfoSettings.tsx
index b5d4142f..b14248f9 100644
--- a/src/components/settings/RelayInfoSettings.tsx
+++ b/src/components/settings/RelayInfoSettings.tsx
@@ -1,6 +1,6 @@
import React, { useEffect } from 'react';
import { Form, Input, Select, Tooltip } from 'antd';
-import { QuestionCircleOutlined, InfoCircleOutlined, UserOutlined, KeyOutlined } from '@ant-design/icons';
+import { QuestionCircleOutlined, InfoCircleOutlined, UserOutlined, KeyOutlined, UploadOutlined } from '@ant-design/icons';
import useGenericSettings from '@app/hooks/useGenericSettings';
import { SettingsGroupType } from '@app/types/settings.types';
import BaseSettingsForm from './BaseSettingsForm';
@@ -72,7 +72,21 @@ const RelayInfoSettings: React.FC = () => {
>
} placeholder="My Nostr Relay" />
-
+
+ Relay Icon
+
+
+
+
+ }
+ >
+ } > Upload Relay Icon}
+ />
+
Date: Wed, 25 Jun 2025 15:35:06 -0700
Subject: [PATCH 15/17] add UI for uploading images
---
src/components/settings/RelayInfoSettings.tsx | 11 +++++--
src/components/settings/Settings.styles.ts | 31 ++++++++++++++-----
2 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/src/components/settings/RelayInfoSettings.tsx b/src/components/settings/RelayInfoSettings.tsx
index b14248f9..cb79cd5a 100644
--- a/src/components/settings/RelayInfoSettings.tsx
+++ b/src/components/settings/RelayInfoSettings.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from 'react';
+import React, { useEffect, useState} from 'react';
import { Form, Input, Select, Tooltip } from 'antd';
import { QuestionCircleOutlined, InfoCircleOutlined, UserOutlined, KeyOutlined, UploadOutlined } from '@ant-design/icons';
import useGenericSettings from '@app/hooks/useGenericSettings';
@@ -10,7 +10,7 @@ const { TextArea } = Input;
const RelayInfoSettings: React.FC = () => {
const { settings, loading, error, fetchSettings, updateSettings, saveSettings } = useGenericSettings('relay_info');
-
+ const [image, setImage] = useState(null);
const [form] = Form.useForm();
// Update form values when settings change
@@ -25,6 +25,10 @@ const RelayInfoSettings: React.FC = () => {
updateSettings(changedValues);
};
+ const onUploadIcon = (url: string) => { // use as onUploadIcon prop in Upload Component
+ setImage(url);
+ };
+
// Common NIPs that relays might support
const nipOptions = [
{ value: 1, label: 'NIP-01: Basic protocol flow' },
@@ -86,6 +90,9 @@ const RelayInfoSettings: React.FC = () => {
} > Upload Relay Icon}
/>
+ {image && (
+
+ )}
Date: Thu, 3 Jul 2025 10:22:36 -0700
Subject: [PATCH 16/17] wrap RelayIcon form item with ComingSoonWrapper
---
src/components/settings/RelayInfoSettings.tsx | 62 ++++++++++++-------
src/styles/themes/reusableComponentStyles.ts | 7 ++-
2 files changed, 46 insertions(+), 23 deletions(-)
diff --git a/src/components/settings/RelayInfoSettings.tsx b/src/components/settings/RelayInfoSettings.tsx
index cb79cd5a..aaa151df 100644
--- a/src/components/settings/RelayInfoSettings.tsx
+++ b/src/components/settings/RelayInfoSettings.tsx
@@ -1,16 +1,23 @@
-import React, { useEffect, useState} from 'react';
+import React, { useEffect, useState } from 'react';
import { Form, Input, Select, Tooltip } from 'antd';
-import { QuestionCircleOutlined, InfoCircleOutlined, UserOutlined, KeyOutlined, UploadOutlined } from '@ant-design/icons';
+import {
+ QuestionCircleOutlined,
+ InfoCircleOutlined,
+ UserOutlined,
+ KeyOutlined,
+ UploadOutlined,
+} from '@ant-design/icons';
import useGenericSettings from '@app/hooks/useGenericSettings';
import { SettingsGroupType } from '@app/types/settings.types';
import BaseSettingsForm from './BaseSettingsForm';
import * as S from './Settings.styles';
+import { ComingSoonWrapper } from '@app/styles/themes/reusableComponentStyles';
const { Option } = Select;
const { TextArea } = Input;
const RelayInfoSettings: React.FC = () => {
const { settings, loading, error, fetchSettings, updateSettings, saveSettings } = useGenericSettings('relay_info');
- const [image, setImage] = useState(null);
+ const [image, setImage] = useState(null);
const [form] = Form.useForm();
// Update form values when settings change
@@ -25,7 +32,8 @@ const RelayInfoSettings: React.FC = () => {
updateSettings(changedValues);
};
- const onUploadIcon = (url: string) => { // use as onUploadIcon prop in Upload Component
+ const onUploadIcon = (url: string) => {
+ // use as onUploadIcon prop in Upload Component
setImage(url);
};
@@ -76,24 +84,34 @@ const RelayInfoSettings: React.FC = () => {
>
} placeholder="My Nostr Relay" />
-
- Relay Icon
-
-
-
-
- }
- >
- } > Upload Relay Icon}
- />
- {image && (
-
- )}
-
+
+
+ Relay Icon
+
+
+
+ (Coming Soon)
+
+ }
+ >
+ {
+ }
+ // > Upload Relay Icon}
+ />
+ }
+ {image && (
+
+
+
+ )}
+
+
Date: Thu, 3 Jul 2025 10:42:45 -0700
Subject: [PATCH 17/17] change color of remove icon on supported nips
---
src/components/settings/RelayInfoSettings.tsx | 88 +++++++++----------
src/components/settings/Settings.styles.ts | 5 +-
2 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/src/components/settings/RelayInfoSettings.tsx b/src/components/settings/RelayInfoSettings.tsx
index aaa151df..19d617a1 100644
--- a/src/components/settings/RelayInfoSettings.tsx
+++ b/src/components/settings/RelayInfoSettings.tsx
@@ -32,10 +32,10 @@ const RelayInfoSettings: React.FC = () => {
updateSettings(changedValues);
};
- const onUploadIcon = (url: string) => {
- // use as onUploadIcon prop in Upload Component
- setImage(url);
- };
+ // const onUploadIcon = (url: string) => {
+ // // use as onUploadIcon prop in Upload Component
+ // setImage(url);
+ // };
// Common NIPs that relays might support
const nipOptions = [
@@ -196,47 +196,47 @@ const RelayInfoSettings: React.FC = () => {
>
-
-
- Supported NIPs
-
-
-
-
- }
- >
- {
- if (!option?.children) return false;
- return option.children.toString().toLowerCase().includes(input.toLowerCase());
- }}
- onChange={(values: (string | number)[]) => {
- // Convert all values to numbers, filtering out invalid ones
- const numberValues = values
- .map((val: string | number) => {
- const num = Number(val);
- return isNaN(num) ? null : num;
- })
- .filter((val: number | null): val is number => val !== null);
-
- // Update the form field with number values
- form.setFieldsValue({ relaysupportednips: numberValues });
- }}
+
+
+ Supported NIPs
+
+
+
+
+ }
>
- {nipOptions.map((option) => (
-
- ))}
-
-
+ {
+ if (!option?.children) return false;
+ return option.children.toString().toLowerCase().includes(input.toLowerCase());
+ }}
+ onChange={(values: (string | number)[]) => {
+ // Convert all values to numbers, filtering out invalid ones
+ const numberValues = values
+ .map((val: string | number) => {
+ const num = Number(val);
+ return isNaN(num) ? null : num;
+ })
+ .filter((val: number | null): val is number => val !== null);
+ // Update the form field with number values
+ form.setFieldsValue({ relaysupportednips: numberValues });
+ }}
+ >
+ {nipOptions.map((option) => (
+
+ ))}
+
+
+