chore: cleanup

This commit is contained in:
amhsirak
2025-01-25 16:13:08 +05:30
parent c46b3e2b75
commit c8add28859

View File

@@ -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';
};