From 58ed90b2e61c59b2f51f146a45a439d8eefa61fc Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 23 Jan 2025 20:49:30 +0530 Subject: [PATCH 01/22] fix: format --- src/components/robot/RecordingsTable.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/robot/RecordingsTable.tsx b/src/components/robot/RecordingsTable.tsx index 6297c7aa..a36707e7 100644 --- a/src/components/robot/RecordingsTable.tsx +++ b/src/components/robot/RecordingsTable.tsx @@ -76,7 +76,14 @@ interface RecordingsTableProps { handleDuplicateRobot: (id: string, name: string, params: string[]) => void; } -export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handleScheduleRecording, handleIntegrateRecording, handleSettingsRecording, handleEditRobot, handleDuplicateRobot }: RecordingsTableProps) => { +export const RecordingsTable = ({ + handleEditRecording, + handleRunRecording, + handleScheduleRecording, + handleIntegrateRecording, + handleSettingsRecording, + handleEditRobot, + handleDuplicateRobot }: RecordingsTableProps) => { const { t } = useTranslation(); const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); From e0f58bb3d098d72a106ddc286d18ec0106aafb3c Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 23 Jan 2025 20:50:16 +0530 Subject: [PATCH 02/22] fix: format --- src/components/robot/RecordingsTable.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/robot/RecordingsTable.tsx b/src/components/robot/RecordingsTable.tsx index a36707e7..a7594b08 100644 --- a/src/components/robot/RecordingsTable.tsx +++ b/src/components/robot/RecordingsTable.tsx @@ -116,7 +116,20 @@ export const RecordingsTable = ({ }, ]; - const { notify, setRecordings, browserId, setBrowserId, setInitialUrl, recordingUrl, setRecordingUrl, isLogin, setIsLogin, recordingName, setRecordingName, recordingId, setRecordingId } = useGlobalInfoStore(); + const { + notify, + setRecordings, + browserId, + setBrowserId, + setInitialUrl, + recordingUrl, + setRecordingUrl, + isLogin, + setIsLogin, + recordingName, + setRecordingName, + recordingId, + setRecordingId } = useGlobalInfoStore(); const navigate = useNavigate(); const handleChangePage = (event: unknown, newPage: number) => { From 76a785b4604f0dec980ad26b7d66dd70b1e03b23 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 23 Jan 2025 20:54:23 +0530 Subject: [PATCH 03/22] chore: cleanup --- src/components/robot/RobotEdit.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index e96fc858..f8e85a77 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -8,7 +8,6 @@ import { useGlobalInfoStore } from '../../context/globalInfo'; import { getStoredRecording, updateRecording } from '../../api/storage'; import { WhereWhatPair } from 'maxun-core'; -// Base interfaces for robot data structure interface RobotMeta { name: string; id: string; From 011a6edf05ff23f379a751349746b6e1f407c5b1 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 23 Jan 2025 20:54:34 +0530 Subject: [PATCH 04/22] chore: cleanup --- src/components/robot/RobotEdit.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index f8e85a77..c9b7bbd6 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -54,7 +54,6 @@ interface RobotSettingsProps { initialSettings?: RobotSettings | null; } -// Enhanced interfaces for credential handling interface CredentialInfo { value: string; type: string; From 3cc23f9854b235aace43d3e65161d6de6dfeb844 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 23 Jan 2025 20:55:10 +0530 Subject: [PATCH 05/22] chore: cleanup --- src/components/robot/RobotEdit.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index c9b7bbd6..035165ba 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -113,7 +113,6 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin return 'username'; } - // If no specific pattern is matched, classify as other return 'other'; }; From ddcbff75bcc78d616d6ccb34a5a7ff885274f297 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:42:33 +0530 Subject: [PATCH 06/22] feat: username --- src/components/robot/RobotEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 035165ba..9e60202c 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -281,7 +281,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {/* Render username credentials */} {renderCredentialFields( credentialGroups.usernames, - t('Username Credentials'), + t('Username'), 'text' // Always show usernames as text )} From 9a7b5d0a8b7f96414dfef2a87ab5da5cdd1cdaaf Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:43:05 +0530 Subject: [PATCH 07/22] feat: email --- src/components/robot/RobotEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 9e60202c..7f6b8693 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -288,7 +288,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {/* Render email credentials */} {renderCredentialFields( credentialGroups.emails, - t('Email Credentials'), + t('Email'), 'text' // Always show emails as text )} From 4d4d4110805541bf06e39dc2e4536aa118d5aa0c Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:43:18 +0530 Subject: [PATCH 08/22] feat: password --- src/components/robot/RobotEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 7f6b8693..02b6f43f 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -295,7 +295,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {/* Render password credentials */} {renderCredentialFields( credentialGroups.passwords, - t('Password Credentials'), + t('Password'), 'password' // Use password masking )} From 1566789a647f1f48c997ab3ae7c26268bbfd899f Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:43:30 +0530 Subject: [PATCH 09/22] feat: other --- src/components/robot/RobotEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 02b6f43f..a62d8e2b 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -302,7 +302,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {/* Render other credentials */} {renderCredentialFields( credentialGroups.others, - t('Other Credentials'), + t('Other'), 'text' // Show other credentials as text )} From 438da828c0a809b0394aee1294d65ca349c14718 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:44:05 +0530 Subject: [PATCH 10/22] chore: cleanup --- src/components/robot/RobotEdit.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index a62d8e2b..45397ff8 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -278,32 +278,28 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin const renderAllCredentialFields = () => { return ( <> - {/* Render username credentials */} {renderCredentialFields( credentialGroups.usernames, t('Username'), - 'text' // Always show usernames as text + 'text' )} - {/* Render email credentials */} {renderCredentialFields( credentialGroups.emails, t('Email'), - 'text' // Always show emails as text + 'text' )} - {/* Render password credentials */} {renderCredentialFields( credentialGroups.passwords, t('Password'), - 'password' // Use password masking + 'password' )} - {/* Render other credentials */} {renderCredentialFields( credentialGroups.others, t('Other'), - 'text' // Show other credentials as text + 'text' )} ); From cf5107f7c89259fed1aa84391ad13fa279d43d61 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:49:21 +0530 Subject: [PATCH 11/22] feat: use input index instead of selector as label --- src/components/robot/RobotEdit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 45397ff8..1c070d45 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -313,7 +313,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {headerText} - {selectors.map((selector) => { + {selectors.map((selector, index) => { const isVisible = showPasswords[selector]; return ( @@ -321,7 +321,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin key={selector} // The type changes based on visibility state type={isVisible ? 'text' : 'password'} - label={`Credential for ${selector}`} + label={`Input ${index + 1}`} value={credentials[selector]?.value || ''} onChange={(e) => handleCredentialChange(selector, e.target.value)} style={{ marginBottom: '20px' }} From 5f0427232d888dea04b58042b4a91369186b8a3f Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:50:12 +0530 Subject: [PATCH 12/22] feat: show input aria-labe; --- src/components/robot/RobotEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 1c070d45..dd511641 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -330,7 +330,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin endAdornment: ( handleClickShowPassword(selector)} edge="end" // Optional: disable if field is empty From a06c6a59ec869c1e4197ba397d384659652cc033 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:50:27 +0530 Subject: [PATCH 13/22] chore: lint --- src/components/robot/RobotEdit.tsx | 70 +++++++++++++++--------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index dd511641..736086c1 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -79,22 +79,22 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin const [robot, setRobot] = useState(null); const [credentials, setCredentials] = useState({}); const { recordingId, notify } = useGlobalInfoStore(); - const [credentialGroups, setCredentialGroups] = useState({ - passwords: [], + const [credentialGroups, setCredentialGroups] = useState({ + passwords: [], emails: [], usernames: [], - others: [] + others: [] }); const [showPasswords, setShowPasswords] = useState({}); const isEmailPattern = (value: string): boolean => { return value.includes('@'); }; - + const isUsernameSelector = (selector: string): boolean => { - return selector.toLowerCase().includes('username') || - selector.toLowerCase().includes('user') || - selector.toLowerCase().includes('email'); + return selector.toLowerCase().includes('username') || + selector.toLowerCase().includes('user') || + selector.toLowerCase().includes('email'); }; const determineCredentialType = (selector: string, info: CredentialInfo): 'password' | 'email' | 'username' | 'other' => { @@ -102,20 +102,20 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin if (info.type === 'password') { return 'password'; } - + // Check for email patterns in the value or selector if (isEmailPattern(info.value) || selector.toLowerCase().includes('email')) { return 'email'; } - + // Check for username patterns in the selector if (isUsernameSelector(selector)) { return 'username'; } - + return 'other'; }; - + useEffect(() => { if (isOpen) { getRobot(); @@ -132,32 +132,32 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin const extractInitialCredentials = (workflow: any[]): Credentials => { const credentials: Credentials = {}; - + // Helper function to check if a character is printable const isPrintableCharacter = (char: string): boolean => { return char.length === 1 && !!char.match(/^[\x20-\x7E]$/); }; - + // Process each step in the workflow workflow.forEach(step => { if (!step.what) return; - + // Keep track of the current input field being processed let currentSelector = ''; let currentValue = ''; let currentType = ''; - + // Process actions in sequence to maintain correct text state step.what.forEach((action: any) => { if ( - (action.action === 'type' || action.action === 'press') && - action.args?.length >= 2 && + (action.action === 'type' || action.action === 'press') && + action.args?.length >= 2 && typeof action.args[1] === 'string' ) { const selector: string = action.args[0]; const character: string = action.args[1]; const inputType: string = action.args[2] || ''; - + // If we're dealing with a new selector, store the previous one if (currentSelector && selector !== currentSelector) { if (!credentials[currentSelector]) { @@ -169,14 +169,14 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin credentials[currentSelector].value = currentValue; } } - + // Update current tracking variables if (selector !== currentSelector) { currentSelector = selector; currentValue = credentials[selector]?.value || ''; currentType = inputType || credentials[selector]?.type || ''; } - + // Handle different types of key actions if (character === 'Backspace') { // Remove the last character when backspace is pressed @@ -188,7 +188,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin // Note: We ignore other special keys like 'Shift', 'Enter', etc. } }); - + // Store the final state of the last processed selector if (currentSelector) { credentials[currentSelector] = { @@ -197,14 +197,14 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin }; } }); - + return credentials; }; const groupCredentialsByType = (credentials: Credentials): GroupedCredentials => { return Object.entries(credentials).reduce((acc: GroupedCredentials, [selector, info]) => { const credentialType = determineCredentialType(selector, info); - + switch (credentialType) { case 'password': acc.passwords.push(selector); @@ -218,7 +218,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin default: acc.others.push(selector); } - + return acc; }, { passwords: [], emails: [], usernames: [], others: [] }); }; @@ -279,25 +279,25 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin return ( <> {renderCredentialFields( - credentialGroups.usernames, + credentialGroups.usernames, t('Username'), 'text' )} - + {renderCredentialFields( - credentialGroups.emails, + credentialGroups.emails, t('Email'), 'text' )} - + {renderCredentialFields( - credentialGroups.passwords, + credentialGroups.passwords, t('Password'), 'password' )} - + {renderCredentialFields( - credentialGroups.others, + credentialGroups.others, t('Other'), 'text' )} @@ -307,15 +307,15 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin const renderCredentialFields = (selectors: string[], headerText: string, defaultType: 'text' | 'password' = 'text') => { if (selectors.length === 0) return null; - + return ( <> - + {headerText} {selectors.map((selector, index) => { const isVisible = showPasswords[selector]; - + return ( handleRobotNameChange(e.target.value)} style={{ marginBottom: '20px' }} /> - + {robot.recording.workflow?.[0]?.what?.[0]?.args?.[0]?.limit !== undefined && ( Date: Sat, 25 Jan 2025 15:57:23 +0530 Subject: [PATCH 14/22] feat: !display header text --- src/components/robot/RobotEdit.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 736086c1..7bfd0fe6 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -310,9 +310,9 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin return ( <> - + {/* {headerText} - + */} {selectors.map((selector, index) => { const isVisible = showPasswords[selector]; @@ -321,7 +321,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin key={selector} // The type changes based on visibility state type={isVisible ? 'text' : 'password'} - label={`Input ${index + 1}`} + label={`Text ${selector}`} value={credentials[selector]?.value || ''} onChange={(e) => handleCredentialChange(selector, e.target.value)} style={{ marginBottom: '20px' }} From 88b2aef2c8c237b2646b0873a07a4d96f9d30a10 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:59:33 +0530 Subject: [PATCH 15/22] feat: set label based on header text --- src/components/robot/RobotEdit.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 7bfd0fe6..1e53a433 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -321,7 +321,8 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin key={selector} // The type changes based on visibility state type={isVisible ? 'text' : 'password'} - label={`Text ${selector}`} + // label={`Text ${selector}`} + label={`${headerText}`} value={credentials[selector]?.value || ''} onChange={(e) => handleCredentialChange(selector, e.target.value)} style={{ marginBottom: '20px' }} From 7a017f5bd80038a4964ed47f9a8c4646b409a183 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:09:33 +0530 Subject: [PATCH 16/22] feat: detect input type password --- src/components/robot/RobotEdit.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 1e53a433..d3e146ad 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -158,6 +158,11 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin const character: string = action.args[1]; const inputType: string = action.args[2] || ''; + // Detect `input[type="password"]` + if (!currentType && inputType.toLowerCase() === 'password') { + currentType = 'password'; + } + // If we're dealing with a new selector, store the previous one if (currentSelector && selector !== currentSelector) { if (!credentials[currentSelector]) { From c46b3e2b755ba424e4d250fb091b3439c59431d0 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:12:45 +0530 Subject: [PATCH 17/22] feat: detect password based on selector --- src/components/robot/RobotEdit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index d3e146ad..23b43f74 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -99,7 +99,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin const determineCredentialType = (selector: string, info: CredentialInfo): 'password' | 'email' | 'username' | 'other' => { // Check for password type first - if (info.type === 'password') { + if (info.type === 'password' || selector.toLowerCase().includes('password')) { return 'password'; } @@ -162,7 +162,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin if (!currentType && inputType.toLowerCase() === 'password') { currentType = 'password'; } - + // If we're dealing with a new selector, store the previous one if (currentSelector && selector !== currentSelector) { if (!credentials[currentSelector]) { From c8add28859905ac4081af9b75c873e1ae17df8de Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:13:08 +0530 Subject: [PATCH 18/22] chore: cleanup --- src/components/robot/RobotEdit.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 23b43f74..f6dff08a 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -98,21 +98,15 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin }; const determineCredentialType = (selector: string, info: CredentialInfo): 'password' | 'email' | 'username' | 'other' => { - // Check for password type first if (info.type === 'password' || selector.toLowerCase().includes('password')) { return 'password'; } - - // Check for email patterns in the value or selector if (isEmailPattern(info.value) || selector.toLowerCase().includes('email')) { return 'email'; } - - // Check for username patterns in the selector if (isUsernameSelector(selector)) { return 'username'; } - return 'other'; }; From 3918a6e558de13927c4ab1289f7a0768b9008224 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:17:48 +0530 Subject: [PATCH 19/22] feat: input label based on headerText --- src/components/robot/RobotEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index f6dff08a..e84168fb 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -321,7 +321,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin // The type changes based on visibility state type={isVisible ? 'text' : 'password'} // label={`Text ${selector}`} - label={`${headerText}`} + label={headerText === 'Other' ? `${`Input`} ${index + 1}` : headerText} value={credentials[selector]?.value || ''} onChange={(e) => handleCredentialChange(selector, e.target.value)} style={{ marginBottom: '20px' }} From 8e5181ec462cc120344356f4dc8a27655bdcbc81 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:18:10 +0530 Subject: [PATCH 20/22] chore: cleanup --- src/components/robot/RobotEdit.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index e84168fb..f9d0752a 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -318,22 +318,18 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin return ( handleCredentialChange(selector, e.target.value)} style={{ marginBottom: '20px' }} InputProps={{ - // Now showing visibility toggle for all fields endAdornment: ( handleClickShowPassword(selector)} edge="end" - // Optional: disable if field is empty disabled={!credentials[selector]?.value} > {isVisible ? : } From e4047b1f659b84287a785451701c3f962aca9fb7 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:21:27 +0530 Subject: [PATCH 21/22] feat: edit input texts --- src/components/robot/RobotEdit.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index f9d0752a..a344268a 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -423,6 +423,9 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {(robot.isLogin || Object.keys(credentials).length > 0) && ( <> + + {t('Input Texts')} + {renderAllCredentialFields()} )} From ee0617cbd593ab6098b943b5f9ddb0a9d9c0f1cd Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 16:21:56 +0530 Subject: [PATCH 22/22] chore: lint --- src/components/robot/RobotEdit.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index a344268a..07cc5b38 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -423,9 +423,9 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {(robot.isLogin || Object.keys(credentials).length > 0) && ( <> - - {t('Input Texts')} - + + {t('Input Texts')} + {renderAllCredentialFields()} )}