Remove TOTP URL from UI (#1674)

This commit is contained in:
Shuchang Zheng
2025-01-29 21:06:08 +08:00
committed by GitHub
parent d1e0a172ec
commit 2166ab129b
10 changed files with 0 additions and 161 deletions

View File

@@ -78,7 +78,6 @@ function createTaskRequestObject(
proxy_location: formValues.proxyLocation ?? ProxyLocation.Residential,
navigation_payload: transform(formValues.navigationPayload),
extracted_information_schema: extractedInformationSchema,
totp_verification_url: transform(formValues.totpVerificationUrl),
totp_identifier: transform(formValues.totpIdentifier),
error_code_mapping: errorCodeMapping,
};
@@ -556,32 +555,6 @@ function CreateNewTaskForm({ initialValues }: Props) {
)}
/>
<Separator />
<FormField
control={form.control}
name="totpVerificationUrl"
render={({ field }) => (
<FormItem>
<div className="flex gap-16">
<FormLabel>
<div className="w-72">
<h1 className="text-lg">2FA Verification URL</h1>
<h2 className="text-base text-slate-400"></h2>
</div>
</FormLabel>
<div className="w-full">
<FormControl>
<Input
{...field}
placeholder="Provide your 2FA endpoint"
value={field.value === null ? "" : field.value}
/>
</FormControl>
<FormMessage />
</div>
</div>
</FormItem>
)}
/>
<FormField
control={form.control}
name="totpIdentifier"

View File

@@ -59,7 +59,6 @@ function CreateNewTaskFormPage() {
),
errorCodeMapping: null,
totpIdentifier: null,
totpVerificationUrl: null,
webhookCallbackUrl: null,
proxyLocation: null,
}}
@@ -127,8 +126,6 @@ function CreateNewTaskFormPage() {
: JSON.stringify(navigationPayload, null, 2),
maxStepsOverride,
totpIdentifier: data.workflow_definition.blocks[0].totp_identifier,
totpVerificationUrl:
data.workflow_definition.blocks[0].totp_verification_url,
errorCodeMapping: JSON.stringify(errorCodeMapping, null, 2),
}}
/>

View File

@@ -54,7 +54,6 @@ function createTaskRequestObject(formValues: SavedTaskFormValues) {
extracted_information_schema: safeParseMaybeJSONString(
formValues.extractedInformationSchema,
),
totp_verification_url: transform(formValues.totpVerificationUrl),
totp_identifier: transform(formValues.totpIdentifier),
error_code_mapping: safeParseMaybeJSONString(formValues.errorCodeMapping),
};
@@ -98,7 +97,6 @@ function createTaskTemplateRequestObject(values: SavedTaskFormValues) {
values.extractedInformationSchema,
),
max_steps_per_run: values.maxStepsOverride,
totp_verification_url: values.totpVerificationUrl,
totp_identifier: values.totpIdentifier,
error_code_mapping: safeParseMaybeJSONString(values.errorCodeMapping),
},
@@ -705,32 +703,6 @@ function SavedTaskForm({ initialValues }: Props) {
)}
/>
<Separator />
<FormField
control={form.control}
name="totpVerificationUrl"
render={({ field }) => (
<FormItem>
<div className="flex gap-16">
<FormLabel>
<div className="w-72">
<h1 className="text-lg">2FA Verification URL</h1>
<h2 className="text-base text-slate-400"></h2>
</div>
</FormLabel>
<div className="w-full">
<FormControl>
<Input
{...field}
placeholder="Provide your 2FA endpoint"
value={field.value === null ? "" : field.value}
/>
</FormControl>
<FormMessage />
</div>
</div>
</FormItem>
)}
/>
<FormField
control={form.control}
name="totpIdentifier"

View File

@@ -38,7 +38,6 @@ function RetryTask() {
),
webhookCallbackUrl: task.request.webhook_callback_url ?? null,
totpIdentifier: task.request.totp_identifier ?? null,
totpVerificationUrl: task.request.totp_verification_url ?? null,
errorCodeMapping: task.request.error_code_mapping
? JSON.stringify(task.request.error_code_mapping, null, 2)
: "",

View File

@@ -11,7 +11,6 @@ const createNewTaskFormSchemaBase = z.object({
navigationPayload: z.string().or(z.null()),
extractedInformationSchema: z.string().or(z.null()),
maxStepsOverride: z.number().or(z.null()).optional(),
totpVerificationUrl: z.string().or(z.null()),
totpIdentifier: z.string().or(z.null()),
errorCodeMapping: z.string().or(z.null()),
proxyLocation: z.nativeEnum(ProxyLocation).or(z.null()),

View File

@@ -339,25 +339,6 @@ function ActionNode({ id, data }: NodeProps<ActionNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["action"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={placeholders["action"]["totpVerificationUrl"]}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">

View File

@@ -317,27 +317,6 @@ function FileDownloadNode({ id, data }: NodeProps<FileDownloadNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["download"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={
placeholders["download"]["totpVerificationUrl"]
}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">

View File

@@ -331,25 +331,6 @@ function LoginNode({ id, data }: NodeProps<LoginNode>) {
</div>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["login"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={placeholders["login"]["totpVerificationUrl"]}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">

View File

@@ -358,29 +358,6 @@ function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={
helpTooltips["navigation"]["totpVerificationUrl"]
}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={
placeholders["navigation"]["totpVerificationUrl"]
}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">

View File

@@ -387,25 +387,6 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
/>
</div>
<Separator />
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">
2FA Verification URL
</Label>
<HelpTooltip
content={helpTooltips["task"]["totpVerificationUrl"]}
/>
</div>
<WorkflowBlockInputTextarea
nodeId={id}
onChange={(value) => {
handleChange("totpVerificationUrl", value);
}}
value={inputs.totpVerificationUrl ?? ""}
placeholder={placeholders["task"]["totpVerificationUrl"]}
className="nopan text-xs"
/>
</div>
<div className="space-y-2">
<div className="flex gap-2">
<Label className="text-xs text-slate-300">