mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
fix(console): add code editor field label (#1170)
This commit is contained in:
parent
cf470446e4
commit
9aab5eebf7
4 changed files with 17 additions and 9 deletions
|
@ -11,6 +11,7 @@ import Card from '@/components/Card';
|
|||
import CodeEditor from '@/components/CodeEditor';
|
||||
import DangerousRaw from '@/components/DangerousRaw';
|
||||
import DetailsSkeleton from '@/components/DetailsSkeleton';
|
||||
import FormField from '@/components/FormField';
|
||||
import LinkButton from '@/components/LinkButton';
|
||||
import TabNav, { TabNavItem } from '@/components/TabNav';
|
||||
import UserName from '@/components/UserName';
|
||||
|
@ -103,7 +104,9 @@ const AuditLogDetails = () => {
|
|||
</TabNavItem>
|
||||
</TabNav>
|
||||
<div className={styles.main}>
|
||||
<CodeEditor language="json" value={JSON.stringify(data.payload, null, 2)} />
|
||||
<FormField title="admin_console.log_details.raw_data">
|
||||
<CodeEditor language="json" value={JSON.stringify(data.payload, null, 2)} />
|
||||
</FormField>
|
||||
</div>
|
||||
</Card>
|
||||
</>
|
||||
|
|
|
@ -13,6 +13,7 @@ import CodeEditor from '@/components/CodeEditor';
|
|||
import CopyToClipboard from '@/components/CopyToClipboard';
|
||||
import DetailsSkeleton from '@/components/DetailsSkeleton';
|
||||
import Drawer from '@/components/Drawer';
|
||||
import FormField from '@/components/FormField';
|
||||
import LinkButton from '@/components/LinkButton';
|
||||
import Markdown from '@/components/Markdown';
|
||||
import Status from '@/components/Status';
|
||||
|
@ -199,14 +200,16 @@ const ConnectorDetails = () => {
|
|||
</TabNavItem>
|
||||
</TabNav>
|
||||
<div className={styles.main}>
|
||||
<CodeEditor
|
||||
className={styles.codeEditor}
|
||||
language="json"
|
||||
value={config}
|
||||
onChange={(value) => {
|
||||
setConfig(value);
|
||||
}}
|
||||
/>
|
||||
<FormField title="admin_console.connector_details.edit_config_label">
|
||||
<CodeEditor
|
||||
className={styles.codeEditor}
|
||||
language="json"
|
||||
value={config}
|
||||
onChange={(value) => {
|
||||
setConfig(value);
|
||||
}}
|
||||
/>
|
||||
</FormField>
|
||||
{data.type !== ConnectorType.Social && <SenderTester connectorType={data.type} />}
|
||||
{saveError && <div>{saveError}</div>}
|
||||
</div>
|
||||
|
|
|
@ -281,6 +281,7 @@ const translation = {
|
|||
save_success: 'Saved!',
|
||||
send: 'Send',
|
||||
send_error_invalid_format: 'Invalid input',
|
||||
edit_config_label: 'Enter your json here',
|
||||
test_email_sender: 'Test your email sender',
|
||||
test_sms_sender: 'Test your SMS sender',
|
||||
test_message_sent: 'Test message sent!',
|
||||
|
|
|
@ -276,6 +276,7 @@ const translation = {
|
|||
save_success: '保存成功',
|
||||
send: 'Send',
|
||||
send_error_invalid_format: 'Invalid input',
|
||||
edit_config_label: '请在此输入你的 JSON 配置',
|
||||
test_email_sender: 'Test your email sender',
|
||||
test_sms_sender: 'Test your SMS sender',
|
||||
test_message_sent: 'Test Message Sent!',
|
||||
|
|
Loading…
Add table
Reference in a new issue