diff --git a/src/components/AddNode/add-node.css b/src/components/AddNode/add-node.css index 0162ce781..55db68aa0 100644 --- a/src/components/AddNode/add-node.css +++ b/src/components/AddNode/add-node.css @@ -142,8 +142,6 @@ flex-direction: row-reverse; } - - .autogenerated__text { font-family:"monospace"; } diff --git a/src/components/LibraryCopy/LibraryCopy.css b/src/components/LibraryCopy/LibraryCopy.module.css similarity index 56% rename from src/components/LibraryCopy/LibraryCopy.css rename to src/components/LibraryCopy/LibraryCopy.module.css index cd23ad178..e2f945e13 100644 --- a/src/components/LibraryCopy/LibraryCopy.css +++ b/src/components/LibraryCopy/LibraryCopy.module.css @@ -1,5 +1,5 @@ /* Custom Modal Styling */ -.custom-modal { +.customModal { border-radius: 2px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); padding: 20px; @@ -7,18 +7,18 @@ } /* Style for the Upload Buttons section */ -.upload-buttons { +.uploadButtons { display: flex; gap: 10px; margin-bottom: 20px; } -.upload-buttons button { +.uploadButtons button { font-size: 16px; } /* Style for the Local Files Section */ -.local-files-section { +.localFilesSection { height: 200px; margin-top: 1rem; overflow: auto; @@ -28,15 +28,15 @@ } /* Style for the Directory Name Section */ -.directory-form { +.directoryForm { margin-top: 1rem; } -.directory-form label { +.directoryForm label { font-weight: bold; } -.directory-form input { +.directoryForm input { width: 100%; padding: 10px; border: 1px solid #ddd; @@ -44,18 +44,18 @@ } /* Style for the Upload Button Section */ -.upload-button-section { +.uploadButtonSection { margin-top: 1.5rem; text-align: center; } -.upload-button-section button { +.uploadButtonSection button { font-size: 1.15rem; padding: 12px 20px; } /* Style for the Code Display Section */ -.code-display-section { +.codeDisplaySection { margin-top: 1rem; height: 200px; overflow: auto; @@ -64,30 +64,6 @@ border-radius: 5px; } -/* Style for the Progress Bar Section */ -.progress-bar-section { - margin-top: 1rem; -} - -/* Style for the Countdown Alert Section */ -.countdown-alert-section { - margin-top: 1rem; - font-size: 16px; - color: #4caf50; -} -/* Button Styling */ -button { - cursor: pointer; - background-color: #3498db; - color: #fff; - border-radius: 5px; - padding: 10px 20px; - transition: background-color 0.3s; -} - -button:hover { - background-color: #2980b9; -} diff --git a/src/components/LibraryCopy/index.tsx b/src/components/LibraryCopy/index.tsx index b98d73ef5..58782edef 100644 --- a/src/components/LibraryCopy/index.tsx +++ b/src/components/LibraryCopy/index.tsx @@ -45,7 +45,7 @@ import { import { useDispatch } from "react-redux"; import { setSidebarActive } from "../../store/ui/actions"; import { fetchResource } from "../../api/common"; -import "./LibraryCopy.css"; +import styles from "./LibraryCopy.module.css"; export const fetchFilesUnderThisPath = async (path?: string) => { if (!path) return; @@ -78,10 +78,9 @@ export const fetchFoldersUnderThisPath = async (path?: string) => { path, }); - const parsedUpload = - uploads.data && uploads.data[0].subfolders - ? JSON.parse(uploads.data[0].subfolders) - : []; + const parsedUpload = uploads?.data[0].subfolders + ? JSON.parse(uploads.data[0].subfolders) + : []; return parsedUpload; }; @@ -442,14 +441,14 @@ const UploadComponent: React.FC = ({ useEffect(() => { const d = getTimestamp(); setDirectoryName(`${d}`); - }, [uploadFileModal]); + }, []); // Handle server upload const handleUpload = async () => { const client = ChrisAPIClient.getClient(); await client.setUrls(); const onUploadProgress = (file: any, progressEvent: AxiosProgressEvent) => { - if (progressEvent && progressEvent.total) { + if (progressEvent?.total) { const percentCompleted = `${Math.round( (progressEvent.loaded * 100) / progressEvent.total, )}%`; @@ -514,10 +513,10 @@ const UploadComponent: React.FC = ({ onClose={() => handleReset()} isOpen={uploadFileModal} aria-labelledby="file-upload" - className="custom-modal" // Add a custom class for styling + className={styles.customModal} // Add a custom class for styling > {/* Upload Buttons Section */} -
+
= ({ onChange={handleFileChange} multiple /> - -
{/* Local Files Section */} -
+
{progress > 0 ? ( = ({ {/* Directory Name Section */}
event.preventDefault()} - className="directory-form" + className={styles.directoryForm} > = ({ {/* Upload Button Section */} -
+
{/* Code Display Section */} -
+
{Object.keys(currentFile).length === 0 ? ( diff --git a/src/components/VisualDatasets/index.tsx b/src/components/VisualDatasets/index.tsx index 34daaca7b..901173998 100644 --- a/src/components/VisualDatasets/index.tsx +++ b/src/components/VisualDatasets/index.tsx @@ -20,7 +20,6 @@ import { } from "@patternfly/react-core"; import { BrainIcon, DesktopIcon } from "@patternfly/react-icons"; import { Typography } from "antd"; - import WrapperConnect from "../Wrapper"; import { InfoIcon } from "../Common"; import ChrisAPIClient from "../../api/chrisapiclient";