@everymatrix/general-player-login-form 0.0.207 → 0.0.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/general-player-login-form",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.208",
|
|
4
4
|
"main": "dist/general-player-login-form.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "38199cc25098bd517d1f8b13d7607e97cce49af4"
|
|
40
40
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { isMobile } from 'rvhelper';
|
|
6
6
|
|
|
7
7
|
export let imagedesktop:string = '';
|
|
8
|
+
export let captchakey:string = '';
|
|
8
9
|
|
|
9
10
|
let mobileView:boolean = false;
|
|
10
11
|
let userAgent:string = window.navigator.userAgent;
|
|
@@ -24,8 +25,6 @@
|
|
|
24
25
|
let isPasswordVisible:boolean = false;
|
|
25
26
|
let isFormDataInvalid:boolean = true;
|
|
26
27
|
|
|
27
|
-
const captchaKey = '6Lc7w8YcAAAAAEMHc_VNN9bqfVnILoUOHSHyZ0yn';
|
|
28
|
-
|
|
29
28
|
const regexValidators = {
|
|
30
29
|
user: /^(?!(?:.*\d){9})(?=(?:.*[a-zA-Z]){2})^[a-zA-Z\d]*$/,
|
|
31
30
|
email: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,
|
|
@@ -35,7 +34,7 @@
|
|
|
35
34
|
const doRecaptcha = () => {
|
|
36
35
|
return new Promise((resolve, reject) => {
|
|
37
36
|
grecaptcha.ready(() => {
|
|
38
|
-
grecaptcha.execute(
|
|
37
|
+
grecaptcha.execute(captchakey, { action: "submit" }).then((token) => {
|
|
39
38
|
resolve(token);
|
|
40
39
|
});
|
|
41
40
|
});
|
|
@@ -144,10 +143,12 @@
|
|
|
144
143
|
</script>
|
|
145
144
|
|
|
146
145
|
<svelte:head>
|
|
147
|
-
|
|
146
|
+
{#if captchakey}
|
|
147
|
+
<script src="//www.google.com/recaptcha/api.js?render={captchakey}" async defer></script>
|
|
148
|
+
{/if}
|
|
148
149
|
</svelte:head>
|
|
149
150
|
|
|
150
|
-
<div class="g-recaptcha" data-sitekey="{
|
|
151
|
+
<div class="g-recaptcha" data-sitekey="{captchakey}" />
|
|
151
152
|
{#if isLoading}
|
|
152
153
|
<div class="ModalLoader"></div>
|
|
153
154
|
{:else}
|