@everymatrix/casino-game-page 0.0.252 → 0.0.255

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.252",
3
+ "version": "0.0.255",
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": "6824e7c03c551fb8c35921b8846fdbbb49f76169"
39
+ "gitHead": "75eba1384dd09e2170373cd0b2350fd226937e2a"
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.append('_sid', sessionID);
155
- url.searchParams.append('funMode', false);
156
- url.searchParams.append('language', lang);
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
- // url.searchParams.append('expand', 'vendor');
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>
@@ -623,7 +620,9 @@
623
620
  }
624
621
  .GameDetails h3 {
625
622
  color: var(--emfe-w-color-white, #FFFFFF);
626
- font-size: 26px;
623
+ font-size: 18px;
624
+ text-align: center;
625
+ padding: 0 10px;
627
626
  }
628
627
  .ButtonsContainer {
629
628
  width: 275px;
@@ -698,8 +697,8 @@
698
697
  }
699
698
  .FavIconContainer {
700
699
  position: absolute;
701
- top: 47px;
702
- left: 47px;
700
+ top: 42px;
701
+ left: 42x;
703
702
  cursor: pointer;
704
703
  }
705
704
  .PanicSectionMobile {