@everymatrix/casino-footer-v2 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/casino-footer-v2.js +152 -152
- package/dist/casino-footer-v2.js.map +1 -1
- package/package.json +2 -2
- package/src/CasinoFooterV2.svelte +15 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-footer-v2",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.14",
|
4
4
|
"main": "dist/casino-footer-v2.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
|
}
|
@@ -15,6 +15,7 @@
|
|
15
15
|
export let env:string = '';
|
16
16
|
export let clientstyling:string = '';
|
17
17
|
export let clientstylingurl:string = '';
|
18
|
+
export let translationUrl:string = '';
|
18
19
|
// Clock exposed attributes - If the clock is enabled, all attributes should be given a value, otherwise they can be ignored safely
|
19
20
|
export let clockenabled:string = ''; // "true" to enable, anything to disable
|
20
21
|
export let clocksecondsenabled:string = ''; // "true" to display seconds in our default format and to refresh the clock every 1000ms
|
@@ -79,6 +80,19 @@
|
|
79
80
|
|
80
81
|
setupI18n({ withLocale: 'en', translations: {}});
|
81
82
|
|
83
|
+
const setTranslationUrl = ():void => {
|
84
|
+
let url:string = translationUrl;
|
85
|
+
|
86
|
+
fetch(url).then((res:any) => res.json())
|
87
|
+
.then((res) => {
|
88
|
+
Object.keys(res).forEach((item:any):void => {
|
89
|
+
addNewMessages(item, res[item]);
|
90
|
+
});
|
91
|
+
}).catch((err:any) => {
|
92
|
+
console.log(err);
|
93
|
+
});
|
94
|
+
}
|
95
|
+
|
82
96
|
Object.keys(CasinoFooterTranslations).forEach((item:any) => {
|
83
97
|
addNewMessages(item, CasinoFooterTranslations[item]);
|
84
98
|
});
|
@@ -327,6 +341,7 @@
|
|
327
341
|
$: languageslist && setLanguagesArray();
|
328
342
|
$: session && userid && userendpoint && setSession();
|
329
343
|
$: endpoint && lang && env && getCmsData();
|
344
|
+
$: translationUrl && setTranslationUrl();
|
330
345
|
$: clockenabled !== 'false' && clocksecondsenabled && clockcustomformat && clockDisplay();
|
331
346
|
$: clockenabled !== 'false' && clocksecondsenabled && (refreshRate = clocksecondsenabled == "true" ? 1000 : 60000) && refreshClock();
|
332
347
|
$: lang && (selectedLanguage = lang) && languages && (languages.length > 0) && updateLanguageDisplayName();
|