@everymatrix/general-player-forgot-password-form 1.0.13 → 1.0.15

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-forgot-password-form",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "dist/general-player-forgot-password-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": "4b2bbc7cb2c3424950a39147a985ac5d38207cdf"
39
+ "gitHead": "0ee1d4bccc4964628711251119148f0a04ba10df"
40
40
  }
@@ -12,6 +12,7 @@
12
12
  export let captchakey:string = '';
13
13
  export let lang:string = '';
14
14
  export let simplepasswordvalidation:string = 'false';
15
+ export let translationUrl:string = '';
15
16
 
16
17
  let isLoading:boolean = false;
17
18
  let forgotPasswordScreen:boolean = true;
@@ -43,6 +44,19 @@
43
44
 
44
45
  // setupI18n({ withLocale: 'en', translations: {}});
45
46
 
47
+ const setTranslationUrl = ():void => {
48
+ let url:string = translationUrl;
49
+
50
+ fetch(url).then((res:any) => res.json())
51
+ .then((res) => {
52
+ Object.keys(res).forEach((item:any):void => {
53
+ addNewMessages(item, res[item]);
54
+ });
55
+ }).catch((err:any) => {
56
+ console.log(err);
57
+ });
58
+ }
59
+
46
60
  Object.keys(ForgotPasswordTranslations).forEach((item:any) => {
47
61
  addNewMessages(item, ForgotPasswordTranslations[item]);
48
62
  });
@@ -232,6 +246,7 @@
232
246
 
233
247
  $: forgotpasswordkey && verifyForgotPasswordScreen();
234
248
  $: lang && initialLoad();
249
+ $: translationUrl && setTranslationUrl();
235
250
  </script>
236
251
 
237
252
  <svelte:head>