@everymatrix/general-player-sms-verification-form 1.0.11 → 1.0.14
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-sms-verification-form",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"main": "index.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": "5da9a4e3b1b2d635a921ce3981f56157191f5aa7"
|
|
40
40
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export let playerid:string = '';
|
|
11
11
|
export let smstemplate:string = 'Please use this code {0} to activate your accout';
|
|
12
12
|
export let number:string = '';
|
|
13
|
+
export let translationUrl:string = '';
|
|
13
14
|
|
|
14
15
|
let smsCode: number;
|
|
15
16
|
let isSmsValid: boolean = true;
|
|
@@ -19,6 +20,19 @@
|
|
|
19
20
|
|
|
20
21
|
setupI18n({ withLocale: 'en', translations: {}});
|
|
21
22
|
|
|
23
|
+
const setTranslationUrl = ():void => {
|
|
24
|
+
let url:string = translationUrl;
|
|
25
|
+
|
|
26
|
+
fetch(url).then((res:any) => res.json())
|
|
27
|
+
.then((res) => {
|
|
28
|
+
Object.keys(res).forEach((item:any):void => {
|
|
29
|
+
addNewMessages(item, res[item]);
|
|
30
|
+
});
|
|
31
|
+
}).catch((err:any) => {
|
|
32
|
+
console.log(err);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
22
36
|
Object.keys(SmsVerificationTranslations).forEach((item:any) => {
|
|
23
37
|
addNewMessages(item, SmsVerificationTranslations[item]);
|
|
24
38
|
});
|
|
@@ -99,6 +113,7 @@
|
|
|
99
113
|
}
|
|
100
114
|
|
|
101
115
|
$: tokenid && playerid && endpoint;
|
|
116
|
+
$: translationUrl && setTranslationUrl();
|
|
102
117
|
</script>
|
|
103
118
|
|
|
104
119
|
|