diff --git a/resources/scripts/components/elements/CopyOnClick.tsx b/resources/scripts/components/elements/CopyOnClick.tsx index 97521980d..42545f61c 100644 --- a/resources/scripts/components/elements/CopyOnClick.tsx +++ b/resources/scripts/components/elements/CopyOnClick.tsx @@ -10,15 +10,20 @@ interface CopyOnClickProps { children: React.ReactNode; } -const CopyOnClick = ({ text, children }: CopyOnClickProps) => { +const CopyOnClick = ({ text, children, showInNotification }: CopyOnClickProps) => { const [copied, setCopied] = useState(false); - const length = 80; - const stringText = String(text); - const truncatedText = stringText && stringText.length > length ? `${stringText.substring(0, length - 3)}...` : text; + let truncatedText; + if (showInNotification == false) { + truncatedText = ''; + } else { + const length = 80; + const stringText = String(text); + truncatedText = stringText.length > length ? `"${stringText.substring(0, length - 3)}..."` : `"${stringText}"`; + } useEffect(() => { if (!copied) return; - toast(`Copied "${truncatedText}" to clipboard`); + toast(`Copied ${truncatedText} to clipboard.`); const timeout = setTimeout(() => { setCopied(false); diff --git a/resources/scripts/components/elements/Input.tsx b/resources/scripts/components/elements/Input.tsx index 3d01eb90e..a610384c0 100644 --- a/resources/scripts/components/elements/Input.tsx +++ b/resources/scripts/components/elements/Input.tsx @@ -39,6 +39,15 @@ const inputStyle = css` &:disabled { } + + padding-left: 1rem; + padding-right: 1rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + border-radius: 0.5rem; + outline: none; + background-color: rgba(255, 255, 255, 0.09); /* Converted the hex color with alpha to rgba */ + font-size: 0.875rem; /* 14px */ `; const Input = styled.input` diff --git a/resources/scripts/components/elements/button/Button.tsx b/resources/scripts/components/elements/button/Button.tsx index 6f40dd190..38ce69983 100644 --- a/resources/scripts/components/elements/button/Button.tsx +++ b/resources/scripts/components/elements/button/Button.tsx @@ -30,12 +30,10 @@ const Button = forwardRef( ); const TextButton = forwardRef(({ className, ...props }, ref) => ( - // @ts-expect-error not sure how to get this correct - - - + + )} - setConnectionVisible(false)}> + setConnectionVisible(false)} + > -

Database connection details

-
- - - - -
-
- - -
-
- - - - -
- -
- - - +
+
+
+ + + + +
+
+ + + + +
+
+ + + + +
+ +
+ +
+ + + + + + +
+
+
+
+
+
+ +
+ +
- -
- - - - -
-
- - - -
diff --git a/resources/scripts/components/server/databases/RotatePasswordButton.tsx b/resources/scripts/components/server/databases/RotatePasswordButton.tsx index 952ff40fe..521da768b 100644 --- a/resources/scripts/components/server/databases/RotatePasswordButton.tsx +++ b/resources/scripts/components/server/databases/RotatePasswordButton.tsx @@ -1,7 +1,10 @@ +import { faRotateRight } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Actions, useStoreActions } from 'easy-peasy'; import { useState } from 'react'; -import Button from '@/components/elements/Button'; +import Spinner from '@/components/elements/Spinner'; +import { Button } from '@/components/elements/button/index'; import { httpErrorToHuman } from '@/api/http'; import { ServerDatabase } from '@/api/server/databases/getServerDatabases'; @@ -38,8 +41,11 @@ export default ({ databaseId, onUpdate }: { databaseId: string; onUpdate: (datab }; return ( - ); }; diff --git a/resources/scripts/components/server/schedules/NewTaskButton.tsx b/resources/scripts/components/server/schedules/NewTaskButton.tsx index 7433abad9..d878759ba 100644 --- a/resources/scripts/components/server/schedules/NewTaskButton.tsx +++ b/resources/scripts/components/server/schedules/NewTaskButton.tsx @@ -1,10 +1,10 @@ +import clsx from 'clsx'; import { useState } from 'react'; import { Button } from '@/components/elements/button/index'; import TaskDetailsModal from '@/components/server/schedules/TaskDetailsModal'; import { Schedule } from '@/api/server/schedules/getServerSchedules'; -import clsx from 'clsx'; interface Props { schedule: Schedule; diff --git a/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx b/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx index 3de4f7437..2cd4c4517 100644 --- a/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx +++ b/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx @@ -100,7 +100,9 @@ export default () => { N/A )} -