Skip to content

Commit fe72245

Browse files
committed
wrap RelayIcon form item with ComingSoonWrapper
1 parent 8549872 commit fe72245

File tree

2 files changed

+46
-23
lines changed

2 files changed

+46
-23
lines changed

src/components/settings/RelayInfoSettings.tsx

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
import React, { useEffect, useState} from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import { Form, Input, Select, Tooltip } from 'antd';
3-
import { QuestionCircleOutlined, InfoCircleOutlined, UserOutlined, KeyOutlined, UploadOutlined } from '@ant-design/icons';
3+
import {
4+
QuestionCircleOutlined,
5+
InfoCircleOutlined,
6+
UserOutlined,
7+
KeyOutlined,
8+
UploadOutlined,
9+
} from '@ant-design/icons';
410
import useGenericSettings from '@app/hooks/useGenericSettings';
511
import { SettingsGroupType } from '@app/types/settings.types';
612
import BaseSettingsForm from './BaseSettingsForm';
713
import * as S from './Settings.styles';
14+
import { ComingSoonWrapper } from '@app/styles/themes/reusableComponentStyles';
815
const { Option } = Select;
916
const { TextArea } = Input;
1017

1118
const RelayInfoSettings: React.FC = () => {
1219
const { settings, loading, error, fetchSettings, updateSettings, saveSettings } = useGenericSettings('relay_info');
13-
const [image, setImage] = useState<string | null>(null);
20+
const [image, setImage] = useState<string | null>(null);
1421
const [form] = Form.useForm();
1522

1623
// Update form values when settings change
@@ -25,7 +32,8 @@ const RelayInfoSettings: React.FC = () => {
2532
updateSettings(changedValues);
2633
};
2734

28-
const onUploadIcon = (url: string) => { // use as onUploadIcon prop in Upload Component
35+
const onUploadIcon = (url: string) => {
36+
// use as onUploadIcon prop in Upload Component
2937
setImage(url);
3038
};
3139

@@ -76,24 +84,34 @@ const RelayInfoSettings: React.FC = () => {
7684
>
7785
<S.InputFieldWithPrefix prefix={<InfoCircleOutlined />} placeholder="My Nostr Relay" />
7886
</Form.Item>
79-
<Form.Item
80-
name = "relayIcon"
81-
label={
82-
<span>
83-
Relay Icon&nbsp;
84-
<Tooltip title="An icon representing your relay">
85-
<QuestionCircleOutlined />
86-
</Tooltip>
87-
</span>
88-
}
89-
>
90-
<S.InputFieldWithPrefix
91-
suffix={<S.UploadButton size='small' aria-label='Upload Relay Icon' icon={<UploadOutlined />} > Upload Relay Icon</S.UploadButton>}
92-
/>
93-
{image && (
94-
<S.UploadedImageWrapper><img src={image} alt="" /></S.UploadedImageWrapper>
95-
)}
96-
</Form.Item>
87+
<ComingSoonWrapper>
88+
<Form.Item
89+
name="relayIcon"
90+
label={
91+
<span>
92+
Relay Icon&nbsp;
93+
<Tooltip title="An icon representing your relay">
94+
<QuestionCircleOutlined />
95+
</Tooltip>
96+
&nbsp;(Coming Soon)
97+
</span>
98+
}
99+
>
100+
{
101+
<S.InputFieldWithPrefix
102+
disabled={true}
103+
placeholder="https://example.com/relay-icon.png"
104+
// suffix={<S.UploadButton size='small' aria-label='Upload Relay Icon' icon={<UploadOutlined />}
105+
// > Upload Relay Icon</S.UploadButton>}
106+
/>
107+
}
108+
{image && (
109+
<S.UploadedImageWrapper>
110+
<img src={image} alt="" />
111+
</S.UploadedImageWrapper>
112+
)}
113+
</Form.Item>
114+
</ComingSoonWrapper>
97115
<Form.Item
98116
name="relaydescription"
99117
label={

src/styles/themes/reusableComponentStyles.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ import { Input } from "antd";
33

44
export const StyledInput = styled(Input)`
55
background-color: var(--layout-sider-bg-color) !important;
6-
`;
6+
`;
7+
8+
export const ComingSoonWrapper = styled.div`
9+
color: var(--text-light-color) !important;
10+
opacity: 60% !important;
11+
`;

0 commit comments

Comments
 (0)