@everymatrix/casino-game-page 0.0.253 → 0.0.256
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-game-page",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.256",
|
4
4
|
"main": "dist/casino-game-page.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": "407c9b355e4c1cd5d9ca02b54bd3fb935ef17d2e"
|
40
40
|
}
|
@@ -33,6 +33,7 @@
|
|
33
33
|
|
34
34
|
export let clockformat:string = '';
|
35
35
|
export let haspanicbutton:string = 'false';
|
36
|
+
export let playforfun:string = 'true';
|
36
37
|
|
37
38
|
let time:Object;
|
38
39
|
let iframe:any;
|
@@ -74,6 +75,7 @@
|
|
74
75
|
// @TODO game typescript model type
|
75
76
|
const formatGameLaunchUrl = (game:any):void => {
|
76
77
|
let url:URL = new URL(game.launchUrl);
|
78
|
+
|
77
79
|
url.searchParams.append('language', lang);
|
78
80
|
// @TODO wtf? session check or go home
|
79
81
|
// Maybe we should check if the session is valid, somehow?
|
@@ -103,20 +105,8 @@
|
|
103
105
|
|
104
106
|
if (game.launchUrl) {
|
105
107
|
detailsObtained = true;
|
106
|
-
funMode = game.hasFunMode;
|
107
|
-
anonymousFunMode = game.hasAnonymousFunMode;
|
108
|
-
|
109
|
-
let url:any = new URL(game.launchUrl);
|
110
|
-
|
111
|
-
if (sessionID && sessionID.length > 0) {
|
112
|
-
isLoggedIn = true;
|
113
|
-
|
114
|
-
url.searchParams.append('_sid', sessionID)
|
115
|
-
url.searchParams.append('funMode', false)
|
116
|
-
url.searchParams.append('language', lang)
|
117
|
-
|
118
|
-
game.launchUrl = url;
|
119
|
-
}
|
108
|
+
funMode = playforfun == 'true' ? game.hasFunMode : false;
|
109
|
+
anonymousFunMode = playforfun == 'true' ? game.hasAnonymousFunMode : false;
|
120
110
|
}
|
121
111
|
}, (err:any) => {
|
122
112
|
console.error('There was an error', err);
|
@@ -151,9 +141,17 @@
|
|
151
141
|
if (game) {
|
152
142
|
let url:any = new URL(game.launchUrl);
|
153
143
|
|
154
|
-
url.searchParams.
|
155
|
-
|
156
|
-
|
144
|
+
if (!url.searchParams.get('_sid')) {
|
145
|
+
url.searchParams.append('_sid', sessionID);
|
146
|
+
}
|
147
|
+
|
148
|
+
if (!url.searchParams.get('funMode')) {
|
149
|
+
url.searchParams.append('funMode', false);
|
150
|
+
}
|
151
|
+
|
152
|
+
if (!url.searchParams.get('_sid')) {
|
153
|
+
url.searchParams.append('language', lang);
|
154
|
+
}
|
157
155
|
|
158
156
|
game.launchUrl = url;
|
159
157
|
|
@@ -200,15 +198,15 @@
|
|
200
198
|
let url:URL = new URL(`${endpoint}/casino/games/${gameId}`);
|
201
199
|
|
202
200
|
url.searchParams.append('language', lang);
|
203
|
-
|
201
|
+
|
204
202
|
fetch(url.href)
|
205
203
|
.then((res:any) => res.json())
|
206
204
|
.then((data:any) => {
|
207
205
|
game = formatGameLaunchUrl(data[0]);
|
208
206
|
|
209
207
|
if (game.launchUrl) {
|
210
|
-
anonymousFunMode = game.hasAnonymousFunMode;
|
211
|
-
funMode = gameFunMode;
|
208
|
+
anonymousFunMode = playforfun == 'true' ? game.hasAnonymousFunMode : false;
|
209
|
+
funMode = playforfun == 'true' ? gameFunMode : false;
|
212
210
|
detailsObtained = true;
|
213
211
|
game.isFavored = checkFavorite(game.id);
|
214
212
|
}
|
@@ -475,7 +473,6 @@
|
|
475
473
|
{/if}
|
476
474
|
<p>{time}</p>
|
477
475
|
</div>
|
478
|
-
|
479
476
|
{:else if anonymousFunMode}
|
480
477
|
<div class="GameDetails" part="GameDetails">
|
481
478
|
<h3>{game.name}</h3>
|