@everymatrix/casino-categories-slider 0.0.407 → 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
|
-
url.searchParams.append('device', deviceSegregationValue);
|
|
115
|
+
let device = getDevice(userAgent);
|
|
106
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
|
+
}
|
|
126
|
+
|
|
127
|
+
url.searchParams.append('period', lastplayedperiod);
|
|
107
128
|
|
|
108
129
|
fetch(url.href)
|
|
109
130
|
.then((res:any) => res.json())
|