Skip to content

Commit

Permalink
add client option to use playwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
folland87 committed Dec 4, 2023
1 parent e9df622 commit 31f1b10
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion client/src/components/WebsiteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function sanitize(form: Record<string, any>): WebsiteFormBody {
const fields = [
'url', 'crawl_every', 'depth', 'limit', 'tags', 'headers',
'lighthouse', 'carbon_footprint', 'responsiveness',
'technologies_and_trackers'
'technologies_and_trackers', 'use_playwright',
];
const body: Record<string, any> = {};
Object.keys(form).forEach((key) => { if (fields.includes(key)) { body[key] = form[key]; } });
Expand Down Expand Up @@ -98,6 +98,18 @@ export default function WebsiteForm({
<hr />
<Text size="lead" bold>Paramètres de crawl</Text>
<Row className="fr-mb-5w">
<Col xs="12" sm="8" md="6">
<Toggle
defaultChecked={form.use_playwright}
hasLabelLeft
label="Utiliser un émulateur de navigateur"
hint="Activer cette option si vous souhaitez utiliser un émulateur de navigateur pour crawler le site web."
onChange={(e: ChangeEvent<HTMLInputElement>) => updateForm({ use_playwright: e.target.checked })}
/>
</Col>
</Row>
<Row className="fr-mb-5w">

<Col>
<Input
css={{ 'fr-input': "input10" }}
Expand Down

0 comments on commit 31f1b10

Please sign in to comment.