@everymatrix/casino-game-page 0.0.269 → 0.0.272

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.269",
3
+ "version": "0.0.272",
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": "f99063bddeebbe083973aa77500fc3ee5d9de894"
39
+ "gitHead": "2251ff7ad156e5d687da1a0ce2f71e526ca4eac5"
40
40
  }
@@ -33,6 +33,8 @@
33
33
  export let clockformat:string = '';
34
34
  export let haspanicbutton:string = 'false';
35
35
  export let playforfun:string = 'true';
36
+ export let checksession:string = 'true';
37
+ export let integratedgameframe:string = 'false';
36
38
 
37
39
  export let gameid:string = '';
38
40
 
@@ -55,7 +57,6 @@
55
57
  let gameFrameContainer:HTMLElement;
56
58
  let gameInnerContainer:HTMLElement;
57
59
  let isFullscreen:boolean = false;
58
- let gameFrameCloseFullScreen:HTMLElement;
59
60
  let modalFrameWidth:number;
60
61
  let modalFrameHeight:number;
61
62
  let gameFrameWidth:number;
@@ -271,8 +272,10 @@
271
272
  }
272
273
 
273
274
  callNative('OPEN_GAME', data);
274
- } else {
275
+ } else if(integratedgameframe == 'false') {
275
276
  window.open(game.launchUrl, '_blank');
277
+ } else if(integratedgameframe == 'true') {
278
+ window.postMessage({ type: 'OpenIntegratedGameFrame' }, window.location.href);
276
279
  }
277
280
  }
278
281
 
@@ -391,14 +394,19 @@
391
394
  }
392
395
 
393
396
  const setSession = ():void => {
394
- checkSession(endpoint, session).then((res:any) => {
395
- sessionID = res.Guid;
396
- playerID = res.UserID;
397
- isLoggedIn = true;
398
- }, (err:any) => {
399
- isLoggedIn = false;
400
- console.error('err on session', err);
401
- });
397
+ if (checksession == 'true') {
398
+ checkSession(endpoint, session).then((res:any) => {
399
+ sessionID = res.Guid;
400
+ playerID = res.UserID;
401
+ isLoggedIn = true;
402
+ }, (err:any) => {
403
+ isLoggedIn = false;
404
+ console.error('err on session', err);
405
+ });
406
+ } else {
407
+ sessionID = session;
408
+ playerID = userid;
409
+ }
402
410
  }
403
411
 
404
412
  const setClientStyling = ():void => {
@@ -522,7 +530,7 @@
522
530
  {:else}
523
531
  {#if isLoggedIn}
524
532
  <div id="IframeContainer" part="IframeContainer" bind:this={gameFrameContainer} class:FullsScreenLayout={isFullscreen} style="width: {modalFrameWidth}; height: {modalFrameHeight}">
525
- <div id="IframeGame" part="IframeGame" bind:this={gameInnerContainer} style="width: {isFullscreen ? '100%' : definitiveIframeWidth}; height: {isFullscreen ? '100%' : definitiveIframeHeight}; max-width: {isFullscreen ? 'none' : (game.width ? game.width + 'px' : '1280px')}; max-height: {isFullscreen ? 'none' : (game.height ? (Math.floor(game.height) + 100) + 'px' : '720px')}">
533
+ <div id="IframeGame" part="IframeGame" bind:this={gameInnerContainer} style="width: {isFullscreen ? '100%' : definitiveIframeWidth}; height: {isFullscreen ? '100%' : definitiveIframeHeight}; max-width: {isFullscreen ? 'none' : (game.width ? game.width + 'px' : '1280px')}; max-height: {isFullscreen ? 'none' : (game.height ? (Math.floor(game.height) + 100) + 'px' : '720px')}">
526
534
  <iframe title="Games" id="IframeGame" class="GamesContainer" part="GamesContainer" aria-hidden="false" src={game.launchUrl} bind:this={iframe}/>
527
535
  <div class="BottomGame" part="BottomGame" bind:this={buttonsContainer}>
528
536
  <button class="DepositButton" part="DepositButton" on:click='{() => toggleDeposit()}'>{$_('gamePage.deposit')}</button>