diff --git a/src/components/recorder/AddWhatCondModal.tsx b/legacy/src/AddWhatCondModal.tsx similarity index 94% rename from src/components/recorder/AddWhatCondModal.tsx rename to legacy/src/AddWhatCondModal.tsx index 53fd38b87..e653405ae 100644 --- a/src/components/recorder/AddWhatCondModal.tsx +++ b/legacy/src/AddWhatCondModal.tsx @@ -1,11 +1,11 @@ import { WhereWhatPair } from "maxun-core"; -import { GenericModal } from "../ui/GenericModal"; +import { GenericModal } from "../../src/components/ui/GenericModal"; import { modalStyle } from "./AddWhereCondModal"; import { Button, TextField, Typography } from "@mui/material"; import React, { useRef } from "react"; -import { KeyValueForm } from "./KeyValueForm"; -import { ClearButton } from "../ui/buttons/ClearButton"; -import { useSocketStore } from "../../context/socket"; +import { KeyValueForm } from "../../src/components/recorder/KeyValueForm"; +import { ClearButton } from "../../src/components/ui/buttons/ClearButton"; +import { useSocketStore } from "../../src/context/socket"; interface AddWhatCondModalProps { isOpen: boolean; diff --git a/src/components/recorder/AddWhereCondModal.tsx b/legacy/src/AddWhereCondModal.tsx similarity index 95% rename from src/components/recorder/AddWhereCondModal.tsx rename to legacy/src/AddWhereCondModal.tsx index 758c9e751..f53d05a73 100644 --- a/src/components/recorder/AddWhereCondModal.tsx +++ b/legacy/src/AddWhereCondModal.tsx @@ -1,15 +1,15 @@ -import { Dropdown as MuiDropdown } from "../ui/DropdownMui"; +import { Dropdown as MuiDropdown } from "../../src/components/ui/DropdownMui"; import { Button, MenuItem, Typography } from "@mui/material"; import React, { useRef } from "react"; -import { GenericModal } from "../ui/GenericModal"; +import { GenericModal } from "../../src/components/ui/GenericModal"; import { WhereWhatPair } from "maxun-core"; import { SelectChangeEvent } from "@mui/material/Select/Select"; import { DisplayConditionSettings } from "./DisplayWhereConditionSettings"; -import { useSocketStore } from "../../context/socket"; +import { useSocketStore } from "../../src/context/socket"; interface AddWhereCondModalProps { isOpen: boolean; diff --git a/src/components/recorder/DisplayWhereConditionSettings.tsx b/legacy/src/DisplayWhereConditionSettings.tsx similarity index 91% rename from src/components/recorder/DisplayWhereConditionSettings.tsx rename to legacy/src/DisplayWhereConditionSettings.tsx index 784d26c48..b159375f5 100644 --- a/src/components/recorder/DisplayWhereConditionSettings.tsx +++ b/legacy/src/DisplayWhereConditionSettings.tsx @@ -1,10 +1,10 @@ import React from "react"; -import { Dropdown as MuiDropdown } from "../ui/DropdownMui"; +import { Dropdown as MuiDropdown } from "../../src/components/ui/DropdownMui"; import { Checkbox, FormControlLabel, FormGroup, MenuItem, Stack, TextField } from "@mui/material"; -import { AddButton } from "../ui/buttons/AddButton"; -import { RemoveButton } from "../ui/buttons/RemoveButton"; -import { KeyValueForm } from "./KeyValueForm"; -import { WarningText } from "../ui/texts"; +import { AddButton } from "../../src/components/ui/buttons/AddButton"; +import { RemoveButton } from "../../src/components/ui/buttons/RemoveButton"; +import { KeyValueForm } from "../../src/components/recorder/KeyValueForm"; +import { WarningText } from "../../src/components/ui/texts"; interface DisplayConditionSettingsProps { whereProp: string; diff --git a/src/components/recorder/LeftSidePanel.tsx b/legacy/src/LeftSidePanel.tsx similarity index 93% rename from src/components/recorder/LeftSidePanel.tsx rename to legacy/src/LeftSidePanel.tsx index 8fddbbb47..c9a6f41dc 100644 --- a/src/components/recorder/LeftSidePanel.tsx +++ b/legacy/src/LeftSidePanel.tsx @@ -1,14 +1,14 @@ import { Box, Paper, Tab, Tabs } from "@mui/material"; import React, { useCallback, useEffect, useState } from "react"; -import { getActiveWorkflow, getParamsOfActiveWorkflow } from "../../api/workflow"; -import { useSocketStore } from '../../context/socket'; +import { getActiveWorkflow, getParamsOfActiveWorkflow } from "../../src/api/workflow"; +import { useSocketStore } from '../../src/context/socket'; import { WhereWhatPair, WorkflowFile } from "maxun-core"; -import { emptyWorkflow } from "../../shared/constants"; +import { emptyWorkflow } from "../../src/shared/constants"; import { LeftSidePanelContent } from "./LeftSidePanelContent"; -import { useGlobalInfoStore } from "../../context/globalInfo"; +import { useGlobalInfoStore } from "../../src/context/globalInfo"; import { TabContext, TabPanel } from "@mui/lab"; import { LeftSidePanelSettings } from "./LeftSidePanelSettings"; -import { RunSettings } from "../run/RunSettings"; +import { RunSettings } from "../../src/components/run/RunSettings"; const fetchWorkflow = (id: string, callback: (response: WorkflowFile) => void) => { getActiveWorkflow(id).then( diff --git a/src/components/recorder/LeftSidePanelContent.tsx b/legacy/src/LeftSidePanelContent.tsx similarity index 92% rename from src/components/recorder/LeftSidePanelContent.tsx rename to legacy/src/LeftSidePanelContent.tsx index 745e0e31f..5ab5b2bdb 100644 --- a/src/components/recorder/LeftSidePanelContent.tsx +++ b/legacy/src/LeftSidePanelContent.tsx @@ -1,11 +1,11 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Pair } from "./Pair"; import { WhereWhatPair, WorkflowFile } from "maxun-core"; -import { useSocketStore } from "../../context/socket"; +import { useSocketStore } from "../../src/context/socket"; import { Socket } from "socket.io-client"; -import { AddButton } from "../ui/buttons/AddButton"; -import { AddPair } from "../../api/workflow"; -import { GenericModal } from "../ui/GenericModal"; +import { AddButton } from "../../src/components/ui/buttons/AddButton"; +import { AddPair } from "../../src/api/workflow"; +import { GenericModal } from "../../src/components/ui/GenericModal"; import { PairEditForm } from "./PairEditForm"; import { Tooltip } from "@mui/material"; diff --git a/src/components/recorder/LeftSidePanelSettings.tsx b/legacy/src/LeftSidePanelSettings.tsx similarity index 92% rename from src/components/recorder/LeftSidePanelSettings.tsx rename to legacy/src/LeftSidePanelSettings.tsx index 87c73ce17..b7c9b095c 100644 --- a/src/components/recorder/LeftSidePanelSettings.tsx +++ b/legacy/src/LeftSidePanelSettings.tsx @@ -1,8 +1,8 @@ import React from "react"; import { Button, MenuItem, TextField, Typography } from "@mui/material"; -import { Dropdown } from "../ui/DropdownMui"; -import { RunSettings } from "../run/RunSettings"; -import { useSocketStore } from "../../context/socket"; +import { Dropdown } from "../../src/components/ui/DropdownMui"; +import { RunSettings } from "../../src/components/run/RunSettings"; +import { useSocketStore } from "../../src/context/socket"; interface LeftSidePanelSettingsProps { params: any[] diff --git a/src/components/recorder/Pair.tsx b/legacy/src/Pair.tsx similarity index 93% rename from src/components/recorder/Pair.tsx rename to legacy/src/Pair.tsx index 12d2eca72..c718c7752 100644 --- a/src/components/recorder/Pair.tsx +++ b/legacy/src/Pair.tsx @@ -1,13 +1,13 @@ import React, { FC, useState } from 'react'; import { Stack, Button, IconButton, Tooltip, Badge } from "@mui/material"; -import { AddPair, deletePair, UpdatePair } from "../../api/workflow"; +import { AddPair, deletePair, UpdatePair } from "../../src/api/workflow"; import { WorkflowFile } from "maxun-core"; -import { ClearButton } from "../ui/buttons/ClearButton"; -import { GenericModal } from "../ui/GenericModal"; +import { ClearButton } from "../../src/components/ui/buttons/ClearButton"; +import { GenericModal } from "../../src/components/ui/GenericModal"; import { PairEditForm } from "./PairEditForm"; import { PairDisplayDiv } from "./PairDisplayDiv"; -import { EditButton } from "../ui/buttons/EditButton"; -import { BreakpointButton } from "../ui/buttons/BreakpointButton"; +import { EditButton } from "../../src/components/ui/buttons/EditButton"; +import { BreakpointButton } from "../../src/components/ui/buttons/BreakpointButton"; import VisibilityIcon from '@mui/icons-material/Visibility'; import styled from "styled-components"; import { LoadingButton } from "@mui/lab"; diff --git a/src/components/recorder/PairDetail.tsx b/legacy/src/PairDetail.tsx similarity index 97% rename from src/components/recorder/PairDetail.tsx rename to legacy/src/PairDetail.tsx index da9be05a6..66098b17a 100644 --- a/src/components/recorder/PairDetail.tsx +++ b/legacy/src/PairDetail.tsx @@ -6,12 +6,12 @@ import TreeView from '@mui/lab/TreeView'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import TreeItem from '@mui/lab/TreeItem'; -import { AddButton } from "../ui/buttons/AddButton"; -import { WarningText } from "../ui/texts"; +import { AddButton } from "../../src/components/ui/buttons/AddButton"; +import { WarningText } from "../../src/components/ui/texts"; import NotificationImportantIcon from '@mui/icons-material/NotificationImportant'; -import { RemoveButton } from "../ui/buttons/RemoveButton"; +import { RemoveButton } from "../../src/components/ui/buttons/RemoveButton"; import { AddWhereCondModal } from "./AddWhereCondModal"; -import { useSocketStore } from "../../context/socket"; +import { useSocketStore } from "../../src/context/socket"; import { AddWhatCondModal } from "./AddWhatCondModal"; interface PairDetailProps { diff --git a/src/components/recorder/PairDisplayDiv.tsx b/legacy/src/PairDisplayDiv.tsx similarity index 100% rename from src/components/recorder/PairDisplayDiv.tsx rename to legacy/src/PairDisplayDiv.tsx diff --git a/src/components/recorder/PairEditForm.tsx b/legacy/src/PairEditForm.tsx similarity index 100% rename from src/components/recorder/PairEditForm.tsx rename to legacy/src/PairEditForm.tsx diff --git a/src/components/recorder/Renderer.tsx b/legacy/src/Renderer.tsx similarity index 100% rename from src/components/recorder/Renderer.tsx rename to legacy/src/Renderer.tsx diff --git a/server/src/routes/integration.ts b/server/src/routes/integration.ts deleted file mode 100644 index 3c4672c58..000000000 --- a/server/src/routes/integration.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Router } from 'express'; -import logger from "../logger"; -// import { loadIntegrations, saveIntegrations } from '../workflow-management/integrations/gsheet'; -import { requireSignIn } from '../middlewares/auth'; - -export const router = Router(); - -router.post('/upload-credentials', requireSignIn, async (req, res) => { - try { - const { fileName, credentials, spreadsheetId, range } = req.body; - if (!fileName || !credentials || !spreadsheetId || !range) { - return res.status(400).json({ message: 'Credentials, Spreadsheet ID, and Range are required.' }); - } - // *** TEMPORARILY WE STORE CREDENTIALS HERE *** - } catch (error: any) { - logger.log('error', `Error saving credentials: ${error.message}`); - return res.status(500).json({ message: 'Failed to save credentials.', error: error.message }); - } -}); \ No newline at end of file diff --git a/src/components/run/ColapsibleRow.tsx b/src/components/run/ColapsibleRow.tsx index 63025a465..67e82bf06 100644 --- a/src/components/run/ColapsibleRow.tsx +++ b/src/components/run/ColapsibleRow.tsx @@ -9,7 +9,6 @@ import { deleteRunFromStorage } from "../../api/storage"; import { columns, Data } from "./RunsTable"; import { RunContent } from "./RunContent"; import { GenericModal } from "../ui/GenericModal"; -import { modalStyle } from "../recorder/AddWhereCondModal"; import { getUserById } from "../../api/auth"; import { useTranslation } from "react-i18next"; import { useTheme } from "@mui/material/styles"; @@ -230,3 +229,15 @@ export const CollapsibleRow = ({ row, handleDelete, isOpen, onToggleExpanded, cu ); } + +export const modalStyle = { + top: '45%', + left: '50%', + transform: 'translate(-50%, -50%)', + width: '30%', + backgroundColor: 'background.paper', + p: 4, + height: 'fit-content', + display: 'block', + padding: '20px', +}; \ No newline at end of file diff --git a/src/components/run/RunSettings.tsx b/src/components/run/RunSettings.tsx index 33427d168..51dcd08f9 100644 --- a/src/components/run/RunSettings.tsx +++ b/src/components/run/RunSettings.tsx @@ -3,7 +3,7 @@ import { GenericModal } from "../ui/GenericModal"; import { MenuItem, TextField, Typography, Switch, FormControlLabel } from "@mui/material"; import { Dropdown } from "../ui/DropdownMui"; import Button from "@mui/material/Button"; -import { modalStyle } from "../recorder/AddWhereCondModal"; +import { modalStyle } from "../run/ColapsibleRow"; interface RunSettingsProps { isOpen: boolean;