@everymatrix/casino-categories-slider 0.0.406 → 0.0.408
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-categories-slider",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.408",
|
|
4
4
|
"main": "dist/casino-categories-slider.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": "0646a5f1c1388d61a14e03d9b1765ac97950bd96"
|
|
40
40
|
}
|
|
@@ -76,9 +76,20 @@
|
|
|
76
76
|
const getMostPlayedGames = ():Promise<boolean> => {
|
|
77
77
|
if (mostplayed) {
|
|
78
78
|
let url:URL = new URL(`${endpoint}/player/${userid}/games/most-played`);
|
|
79
|
+
|
|
80
|
+
let device = getDevice(userAgent);
|
|
81
|
+
|
|
82
|
+
if (device) {
|
|
83
|
+
if (device === 'PC') {
|
|
84
|
+
url.searchParams.append('device', 'Desktop');
|
|
85
|
+
} else {
|
|
86
|
+
url.searchParams.append('device', 'Mobile');
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
url.searchParams.append('device', 'All');
|
|
90
|
+
}
|
|
79
91
|
|
|
80
92
|
url.searchParams.append('rounds', mostplayedrounds);
|
|
81
|
-
url.searchParams.append('device', deviceSegregationValue);
|
|
82
93
|
|
|
83
94
|
return new Promise((resolve, reject) => {
|
|
84
95
|
fetch(url.href)
|
|
@@ -101,9 +112,19 @@
|
|
|
101
112
|
if (lastplayed) {
|
|
102
113
|
let url:URL = new URL(`${endpoint}/player/${userid}/games/last-played`);
|
|
103
114
|
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
let device = getDevice(userAgent);
|
|
116
|
+
|
|
117
|
+
if (device) {
|
|
118
|
+
if (device === 'PC') {
|
|
119
|
+
url.searchParams.append('device', 'Desktop');
|
|
120
|
+
} else {
|
|
121
|
+
url.searchParams.append('device', 'Mobile');
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
url.searchParams.append('device', 'All');
|
|
125
|
+
}
|
|
106
126
|
|
|
127
|
+
url.searchParams.append('period', lastplayedperiod);
|
|
107
128
|
|
|
108
129
|
fetch(url.href)
|
|
109
130
|
.then((res:any) => res.json())
|
|
@@ -212,11 +233,6 @@
|
|
|
212
233
|
|
|
213
234
|
return hasErrors;
|
|
214
235
|
}
|
|
215
|
-
|
|
216
|
-
const checkIfLoaded = ():void => {
|
|
217
|
-
isLoading = !favoritesLoaded && !mostPlayedLoaded && !lastPlayedLoaded && !categoriesLoaded;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
236
|
const setDevice = ():void => {
|
|
221
237
|
let device = getDevice(userAgent)
|
|
222
238
|
|
|
@@ -343,7 +359,7 @@
|
|
|
343
359
|
$: session && favorites && !isLoading && addFavoritesCategory();
|
|
344
360
|
$: session && endpoint && !isLoading && lastplayed && addLastPlayedCategory();
|
|
345
361
|
$: session && endpoint && !isLoading && userid && mostplayed && addMostPlayedCategory();
|
|
346
|
-
$: !isLoading && activecategory && setActiveCategory();
|
|
362
|
+
$: !isLoading && activecategory && (session ? lastPlayedAdded && mostPlayedAdded && favoritesAdded : true) && setActiveCategory();
|
|
347
363
|
$: clientstyling && setClientStyling();
|
|
348
364
|
$: clientstylingurl && setClientStylingURL();
|
|
349
365
|
</script>
|