@everymatrix/casino-tournaments-thumbnail-controller 1.0.13 → 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/casino-tournaments-thumbnail-controller",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "main": "dist/casino-tournaments-thumbnail-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -29,10 +29,10 @@
29
29
  "typescript": "^3.9.3"
30
30
  },
31
31
  "dependencies": {
32
- "@everymatrix/casino-tournaments-thumbnail": "^1.0.13",
33
- "@everymatrix/casino-tournaments-thumbnail-duration": "^1.0.13",
34
- "@everymatrix/casino-tournaments-thumbnail-games-slider": "^1.0.13",
35
- "@everymatrix/casino-tournaments-thumbnail-prizes": "^1.0.13",
32
+ "@everymatrix/casino-tournaments-thumbnail": "^1.0.14",
33
+ "@everymatrix/casino-tournaments-thumbnail-duration": "^1.0.14",
34
+ "@everymatrix/casino-tournaments-thumbnail-games-slider": "^1.0.14",
35
+ "@everymatrix/casino-tournaments-thumbnail-prizes": "^1.0.14",
36
36
  "cross-env": "^7.0.3",
37
37
  "sirv-cli": "^1.0.0",
38
38
  "svelte": "^3.0.0"
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "4b2bbc7cb2c3424950a39147a985ac5d38207cdf"
43
+ "gitHead": "5da9a4e3b1b2d635a921ce3981f56157191f5aa7"
44
44
  }
@@ -32,6 +32,7 @@
32
32
  export let keepbrowsercontext:string = 'false';
33
33
  export let clientstyling:string = '';
34
34
  export let clientstylingurl:string = '';
35
+ export let translationUrl:string = '';
35
36
 
36
37
  let customStylingContainer: HTMLElement;
37
38
  let displayNone:boolean = false;
@@ -67,6 +68,19 @@
67
68
 
68
69
  setupI18n({ withLocale: 'en', translations: {}});
69
70
 
71
+ const setTranslationUrl = ():void => {
72
+ let url:string = translationUrl;
73
+
74
+ fetch(url).then((res:any) => res.json())
75
+ .then((res) => {
76
+ Object.keys(res).forEach((item:any):void => {
77
+ addNewMessages(item, res[item]);
78
+ });
79
+ }).catch((err:any) => {
80
+ console.log(err);
81
+ });
82
+ }
83
+
70
84
  Object.keys(TournamentsThControllerTranslations).forEach((item) => {
71
85
  addNewMessages(item, TournamentsThControllerTranslations[item]);
72
86
  });
@@ -340,6 +354,7 @@
340
354
 
341
355
  $: customStylingContainer && clientstyling && setClientStyling();
342
356
  $: customStylingContainer && clientstylingurl && setClientStylingURL();
357
+ $: translationUrl && setTranslationUrl();
343
358
  $: session && setSession();
344
359
  $: initialParameters = tournamenturl && lang;
345
360
  $: initialParameters && initialLoad();