mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-01 00:03:33 +00:00
Use code edit for dns provider config dialog
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||||
|
import CodeEditor from "@uiw/react-textarea-code-editor";
|
||||||
import { Field, useFormikContext } from "formik";
|
import { Field, useFormikContext } from "formik";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Select, { type ActionMeta } from "react-select";
|
import Select, { type ActionMeta } from "react-select";
|
||||||
@@ -74,11 +75,20 @@ export function DNSProviderFields({ showBoundaryBox = false }: Props) {
|
|||||||
<label htmlFor="dnsProviderCredentials" className="form-label">
|
<label htmlFor="dnsProviderCredentials" className="form-label">
|
||||||
<T id="certificates.dns.credentials" />
|
<T id="certificates.dns.credentials" />
|
||||||
</label>
|
</label>
|
||||||
<textarea
|
<CodeEditor
|
||||||
|
language="bash"
|
||||||
id="dnsProviderCredentials"
|
id="dnsProviderCredentials"
|
||||||
className="form-control textareaMono"
|
padding={15}
|
||||||
rows={3}
|
data-color-mode="dark"
|
||||||
spellCheck={false}
|
minHeight={130}
|
||||||
|
indentWidth={2}
|
||||||
|
style={{
|
||||||
|
fontFamily:
|
||||||
|
"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",
|
||||||
|
borderRadius: "0.3rem",
|
||||||
|
minHeight: "130px",
|
||||||
|
backgroundColor: "var(--tblr-bg-surface-dark)",
|
||||||
|
}}
|
||||||
value={v.meta.dnsProviderCredentials || ""}
|
value={v.meta.dnsProviderCredentials || ""}
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user