Skip to content

Commit

Permalink
Procaptcha common (#1110)
Browse files Browse the repository at this point in the history
* wip

* nearly there

* revert html changes

* building

* remove commented

* Update vite build config

* lint:fix

* Add small wait to test

* Address Hugh's comments and remove a couple of s
  • Loading branch information
forgetso authored Mar 19, 2024
1 parent 0734241 commit a072113
Show file tree
Hide file tree
Showing 49 changed files with 7,898 additions and 7,583 deletions.
9 changes: 1 addition & 8 deletions demos/client-example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Prosopo procaptcha client login example" />
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="manifest.json" />

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
5 changes: 5 additions & 0 deletions demos/client-example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
ProcaptchaOutput,
} from '@prosopo/types'
import { ExtensionAccountSelect, Procaptcha } from '@prosopo/procaptcha-react'
import { ProcaptchaFrictionless } from '@prosopo/procaptcha-frictionless'
import { useState } from 'react'
const corsHeaders = {
'Access-Control-Allow-Origin': '*', // Required for CORS support to work
Expand Down Expand Up @@ -200,6 +201,10 @@ function App() {
</FormControl>

<FormControl sx={{ m: 1 }}>
<ProcaptchaFrictionless
config={config}
callbacks={{ onError, onHuman, onExpired }}
/>
<Procaptcha config={config} callbacks={{ onError, onHuman, onExpired }} />
</FormControl>
<FormControl>
Expand Down
9 changes: 1 addition & 8 deletions demos/client-frictionless-example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Prosopo procaptcha client login example" />
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="manifest.json" />

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
2 changes: 1 addition & 1 deletion demos/client-frictionless-example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function App() {
atlasUri: process.env._DEV_ONLY_WATCH_EVENTS === 'true' || false,
})
return (
<div style={{ height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div style={{ height: '100%', justifyContent: 'center', alignItems: 'center' }}>
<ProcaptchaFrictionless config={config} />
</div>
)
Expand Down
Loading

0 comments on commit a072113

Please sign in to comment.