@everymatrix/casino-most-played-section 1.12.6 → 1.12.7
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-most-played-section",
|
3
|
-
"version": "1.12.
|
3
|
+
"version": "1.12.7",
|
4
4
|
"main": "index.js",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "7f8097b50f6a8794ce81f8961ed3efba1842a578"
|
39
39
|
}
|
@@ -2,7 +2,8 @@
|
|
2
2
|
<script lang="ts">
|
3
3
|
|
4
4
|
import { getDevice } from 'rvhelper';
|
5
|
-
import { _, setLocale } from './i18n';
|
5
|
+
import { _, setLocale, addNewMessages } from './i18n';
|
6
|
+
import { TRANSLATIONS } from './translations';
|
6
7
|
import '@everymatrix/casino-games-category-section'
|
7
8
|
|
8
9
|
export let endpoint:string = '';
|
@@ -21,12 +22,30 @@
|
|
21
22
|
export let visiblegames:string;
|
22
23
|
export let favorites:string = '';
|
23
24
|
export let lastPlayedEmpty:string = '';
|
25
|
+
export let translationurl:string = '';
|
24
26
|
export let casinomygames:string = 'false';
|
25
27
|
export let mostplayedperiod:string = 'Last30Days';
|
26
28
|
export let mostplayedrounds: string = '10';
|
27
29
|
|
28
30
|
|
29
31
|
let userAgent:any = window.navigator.userAgent;
|
32
|
+
|
33
|
+
const setTranslationUrl = ():void => {
|
34
|
+
let url:string = translationurl;
|
35
|
+
|
36
|
+
fetch(url).then((res:any) => res.json())
|
37
|
+
.then((res) => {
|
38
|
+
Object.keys(res).forEach((item:any):void => {
|
39
|
+
addNewMessages(item, res[item]);
|
40
|
+
});
|
41
|
+
}).catch((err:any) => {
|
42
|
+
console.log(err);
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
Object.keys(TRANSLATIONS).forEach((item) => {
|
47
|
+
addNewMessages(item, TRANSLATIONS[item]);
|
48
|
+
});
|
30
49
|
|
31
50
|
let mostPlayedGames:Array<any> = [];
|
32
51
|
let playerID:string;
|
@@ -154,13 +173,14 @@
|
|
154
173
|
$: endpoint && userid && lang && initialLoad();
|
155
174
|
$: clientstyling && customStylingContainer && setClientStyling();
|
156
175
|
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
176
|
+
$: translationurl && setTranslationUrl();
|
157
177
|
$: lang && setActiveLanguage();
|
158
178
|
</script>
|
159
179
|
|
160
180
|
<div class="CasinoGamesCategorySectionContainer" part="CasinoGamesCategorySectionContainer" bind:this={customStylingContainer}>
|
161
181
|
<div class="casino-most-played-section">
|
162
182
|
{#if mostPlayedEmpty}
|
163
|
-
<p class="SearchLoading" part="SearchLoading">
|
183
|
+
<p class="SearchLoading" part="SearchLoading">{$_('noGames')}</p>
|
164
184
|
{:else}
|
165
185
|
<casino-games-category-section
|
166
186
|
session={session}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
export const TRANSLATIONS = {
|
2
|
+
"en": {
|
3
|
+
"noGames": "No games in most played"
|
4
|
+
},
|
5
|
+
"zh-hk": {
|
6
|
+
|
7
|
+
"noGames": "No games in most played"
|
8
|
+
},
|
9
|
+
"de": {
|
10
|
+
|
11
|
+
"noGames": "No games in most played"
|
12
|
+
},
|
13
|
+
"it": {
|
14
|
+
|
15
|
+
"noGames": "No games in most played"
|
16
|
+
},
|
17
|
+
"fr": {
|
18
|
+
|
19
|
+
"noGames": "No games in most played"
|
20
|
+
},
|
21
|
+
"es": {
|
22
|
+
"noGames": "No hay juegos en más jugados."
|
23
|
+
},
|
24
|
+
"tr": {
|
25
|
+
"noGames": "No games in most played"
|
26
|
+
},
|
27
|
+
"ru": {
|
28
|
+
|
29
|
+
"noGames": "No games in most played"
|
30
|
+
},
|
31
|
+
"ro": {
|
32
|
+
|
33
|
+
"noGames": "No games in most played"
|
34
|
+
},
|
35
|
+
"hr": {
|
36
|
+
|
37
|
+
"noGames": "No games in most played"
|
38
|
+
},
|
39
|
+
"hu": {
|
40
|
+
|
41
|
+
"noGames": "No games in most played"
|
42
|
+
},
|
43
|
+
"pl": {
|
44
|
+
|
45
|
+
"noGames": "No games in most played"
|
46
|
+
},
|
47
|
+
"pt": {
|
48
|
+
|
49
|
+
"noGames": "No games in most played"
|
50
|
+
},
|
51
|
+
"sl": {
|
52
|
+
|
53
|
+
"noGames": "No games in most played"
|
54
|
+
},
|
55
|
+
"sr": {
|
56
|
+
|
57
|
+
"noGames": "No games in most played"
|
58
|
+
}
|
59
|
+
}
|