diff --git a/resources/scripts/components/admin/nodes/NodeConfigurationContainer.tsx b/resources/scripts/components/admin/nodes/NodeConfigurationContainer.tsx index 35bb1302..86e6669a 100644 --- a/resources/scripts/components/admin/nodes/NodeConfigurationContainer.tsx +++ b/resources/scripts/components/admin/nodes/NodeConfigurationContainer.tsx @@ -1,11 +1,12 @@ -import getNodeConfiguration from '@/api/admin/nodes/getNodeConfiguration'; -import { Context } from '@/components/admin/nodes/NodeEditContainer'; -import { ApplicationStore } from '@/state'; -import { Actions, useStoreActions } from 'easy-peasy'; import React, { useEffect, useState } from 'react'; import AdminBox from '@/components/admin/AdminBox'; import tw from 'twin.macro'; import { faCode, faDragon } from '@fortawesome/free-solid-svg-icons'; +import getNodeConfiguration from '@/api/admin/nodes/getNodeConfiguration'; +import { Context } from '@/components/admin/nodes/NodeEditContainer'; +import CopyOnClick from '@/components/elements/CopyOnClick'; +import { ApplicationStore } from '@/state'; +import { Actions, useStoreActions } from 'easy-peasy'; export default () => { const { clearAndAddHttpError } = useStoreActions((actions: Actions) => actions.flashes); @@ -32,9 +33,18 @@ export default () => { return (
-
-                    {configuration}
-                
+
+
+ + + + + +
+
+                        {configuration}
+                    
+
diff --git a/resources/scripts/components/elements/CopyOnClick.tsx b/resources/scripts/components/elements/CopyOnClick.tsx index 3d71b0f8..1597881c 100644 --- a/resources/scripts/components/elements/CopyOnClick.tsx +++ b/resources/scripts/components/elements/CopyOnClick.tsx @@ -19,7 +19,7 @@ const Toast = styled.div` } `; -const CopyOnClick: React.FC<{ text: any }> = ({ text, children }) => { +const CopyOnClick: React.FC<{ text: any, hideTextInToast?: boolean }> = ({ text, hideTextInToast, children }) => { const [ copied, setCopied ] = useState(false); useEffect(() => { @@ -45,7 +45,11 @@ const CopyOnClick: React.FC<{ text: any }> = ({ text, children }) => { {copied ?
-

Copied "{text}" to clipboard.

+ {hideTextInToast ? +

Copied text to clipboard.

+ : +

Copied "{text}" to clipboard.

+ }
: