@everymatrix/general-player-register-form 1.2.0 → 1.2.2
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-register-form",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"main": "dist/general-player-register-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": "02dbae5b4d167acdb57c72905b756343a318870a"
|
|
40
40
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
export let userroles:string = '';
|
|
32
32
|
export let clientstyling:string = '';
|
|
33
33
|
export let clientstylingurl:string = '';
|
|
34
|
-
export let
|
|
34
|
+
export let translationurl:string = '';
|
|
35
35
|
|
|
36
36
|
let customStylingContainer:HTMLElement;
|
|
37
37
|
let displayNone:boolean = false;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
// setupI18n({ withLocale: 'en', translations: {}});
|
|
86
86
|
|
|
87
87
|
const setTranslationUrl = ():void => {
|
|
88
|
-
let url:string =
|
|
88
|
+
let url:string = translationurl;
|
|
89
89
|
|
|
90
90
|
fetch(url).then((res:any) => res.json())
|
|
91
91
|
.then((res) => {
|
|
@@ -347,6 +347,7 @@
|
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
const sendSmsToken = async (userData, playerId) => {
|
|
350
|
+
localStorage.setItem('smsTimer', JSON.stringify(Math.floor(Date.now() / 1000)));
|
|
350
351
|
try {
|
|
351
352
|
const res = await fetch(`${endpoint}/player/sms/token`,{
|
|
352
353
|
method: 'POST',
|
|
@@ -431,7 +432,7 @@ $: lang && setActiveLanguage();
|
|
|
431
432
|
$: disabledfields && formatDisabledFields();
|
|
432
433
|
$: clientstyling && customStylingContainer && setClientStyling();
|
|
433
434
|
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
434
|
-
$:
|
|
435
|
+
$: translationurl && setTranslationUrl();
|
|
435
436
|
</script>
|
|
436
437
|
<div bind:this={customStylingContainer}>
|
|
437
438
|
{#if isLoading}
|
|
@@ -479,11 +480,11 @@ $: translationUrl && setTranslationUrl();
|
|
|
479
480
|
>
|
|
480
481
|
</general-player-sms-verification-form>
|
|
481
482
|
{:else}
|
|
482
|
-
<p>
|
|
483
|
-
We encountered an issue sending the sms to your number,
|
|
484
|
-
you can verify your number while loging in
|
|
485
|
-
</p>
|
|
483
|
+
<p class="SMSErrorText">{$_('registerForm.error')}</p>
|
|
486
484
|
{/if}
|
|
485
|
+
{:else if smsSendApiFailed}
|
|
486
|
+
<!-- this case is valid only until NW fixes the internal error on the /player/sms/token which reproduces aprox 1/5 cases. was added as to avoid empty screen due to untreated error -->
|
|
487
|
+
<p class="SMSErrorText">{$_('registerForm.error')}</p>
|
|
487
488
|
{/if}
|
|
488
489
|
{#if showConfirmation}
|
|
489
490
|
<div class="RegisterConfirmation" part="RegisterConfirmation">
|
|
@@ -526,8 +527,8 @@ $: translationUrl && setTranslationUrl();
|
|
|
526
527
|
scrollbar-color: var(--emfe-w-color-gray-100, #E6E6E6) var(--emfe-w-color-gray-50, #F9F8F8);
|
|
527
528
|
scrollbar-width: thin;
|
|
528
529
|
&.RegisterFormContainerMobile {
|
|
529
|
-
padding: 40px 20px
|
|
530
|
-
height:
|
|
530
|
+
padding: 40px 20px 100%;
|
|
531
|
+
height: 65vh;
|
|
531
532
|
overflow-y: scroll;
|
|
532
533
|
}
|
|
533
534
|
}
|
|
@@ -578,6 +579,12 @@ $: translationUrl && setTranslationUrl();
|
|
|
578
579
|
margin-top: 24px;
|
|
579
580
|
}
|
|
580
581
|
|
|
582
|
+
.SMSErrorText {
|
|
583
|
+
height: 80%;
|
|
584
|
+
display: flex;
|
|
585
|
+
align-items: center;
|
|
586
|
+
}
|
|
587
|
+
|
|
581
588
|
.RegisterConfirmation {
|
|
582
589
|
display: flex;
|
|
583
590
|
flex-direction: column;
|
package/src/translations.js
CHANGED
|
@@ -2,36 +2,43 @@ export const RegisterFormTranslations = {
|
|
|
2
2
|
en: {
|
|
3
3
|
registerForm: {
|
|
4
4
|
goToLoginButton: 'Go To Login',
|
|
5
|
+
error: 'We encountered an issue. Please go to Login to receive your SMS code.'
|
|
5
6
|
}
|
|
6
7
|
},
|
|
7
8
|
zhs: {
|
|
8
9
|
registerForm: {
|
|
9
10
|
goToLoginButton: '去登錄',
|
|
11
|
+
error: '我们遇到了一个问题。请转到登录以接收您的短信代码'
|
|
10
12
|
}
|
|
11
13
|
},
|
|
12
14
|
fr: {
|
|
13
15
|
registerForm: {
|
|
14
16
|
goToLoginButton: 'Aller à la connexion',
|
|
17
|
+
error: 'Nous avons rencontré un problème. Veuillez vous connecter pour recevoir votre code SMS.'
|
|
15
18
|
}
|
|
16
19
|
},
|
|
17
20
|
tr: {
|
|
18
21
|
registerForm: {
|
|
19
22
|
goToLoginButton: 'Giriş Yap',
|
|
23
|
+
error: 'Bir sorunla karşılaştık. SMS kodunuzu almak için lütfen Giriş\'e gidin.'
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
ro: {
|
|
23
27
|
registerForm: {
|
|
24
28
|
goToLoginButton: 'Catre Autentificare',
|
|
29
|
+
error: 'Am întâmpinat o problemă. Vă rugăm să accesați Login pentru a primi codul SMS.'
|
|
25
30
|
}
|
|
26
31
|
},
|
|
27
32
|
es: {
|
|
28
33
|
registerForm: {
|
|
29
34
|
goToLoginButton: 'Ir a Iniciar sesión',
|
|
35
|
+
error: 'Encontramos un problema. Vaya a Iniciar sesión para recibir su código SMS.'
|
|
30
36
|
}
|
|
31
37
|
},
|
|
32
38
|
pt: {
|
|
33
39
|
registerForm: {
|
|
34
40
|
goToLoginButton: 'Ir para o Login',
|
|
41
|
+
error: 'Encontramos um problema. Vá para Login para receber seu código SMS.'
|
|
35
42
|
}
|
|
36
43
|
},
|
|
37
44
|
};
|