@everymatrix/casino-game-page 0.0.266 → 0.0.270

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.266",
3
+ "version": "0.0.270",
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": "6b21b1bd51d22d238761763635b28c6f154513a8"
39
+ "gitHead": "bcb45adcfc2491881a3333ea2b75a5724d94c34a"
40
40
  }
@@ -33,6 +33,7 @@
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';
36
37
 
37
38
  export let gameid:string = '';
38
39
 
@@ -66,6 +67,8 @@
66
67
  let mobileView:boolean = false;
67
68
  let favoriteGames: Array<Object> = [];
68
69
  let customStylingContainer:HTMLElement;
70
+ let buttonsContainer:HTMLElement;
71
+ let timeContainer:HTMLElement;
69
72
  let isOnNative:boolean = false;
70
73
 
71
74
  setupI18n({ withLocale: 'en', translations: {}});
@@ -243,15 +246,13 @@
243
246
  let gameFrame = getComputedStyle(gameInnerContainer);
244
247
  let gameContainerWidth = parseInt(iframeContainer.width.slice(0, -2));
245
248
  let gameContainerHeight = parseInt(iframeContainer.height.slice(0, -2));
246
-
247
249
  const iframeRatio = game.width/(game.height + 100);
248
250
 
249
251
  gameFrameWidth = parseInt(gameFrame.width);
250
252
  gameFrameHeight = parseInt(gameFrame.height);
251
-
252
253
  // resize logic for maintaining game ratio when resizing
253
- if ((gameContainerWidth / iframeRatio) > gameContainerHeight){
254
- gameFrameHeight = gameContainerHeight;
254
+ if ((gameContainerWidth / iframeRatio) > (gameContainerHeight - buttonsContainer.clientHeight - timeContainer.clientHeight)){
255
+ gameFrameHeight = gameContainerHeight - buttonsContainer.clientHeight - timeContainer.clientHeight;
255
256
  gameFrameWidth = gameContainerHeight * iframeRatio;
256
257
  } else {
257
258
  gameFrameWidth = gameContainerWidth;
@@ -391,14 +392,19 @@
391
392
  }
392
393
 
393
394
  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
- });
395
+ if (checksession == 'true') {
396
+ checkSession(endpoint, session).then((res:any) => {
397
+ sessionID = res.Guid;
398
+ playerID = res.UserID;
399
+ isLoggedIn = true;
400
+ }, (err:any) => {
401
+ isLoggedIn = false;
402
+ console.error('err on session', err);
403
+ });
404
+ } else {
405
+ sessionID = session;
406
+ playerID = userid;
407
+ }
402
408
  }
403
409
 
404
410
  const setClientStyling = ():void => {
@@ -524,7 +530,7 @@
524
530
  <div id="IframeContainer" part="IframeContainer" bind:this={gameFrameContainer} class:FullsScreenLayout={isFullscreen} style="width: {modalFrameWidth}; height: {modalFrameHeight}">
525
531
  <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
532
  <iframe title="Games" id="IframeGame" class="GamesContainer" part="GamesContainer" aria-hidden="false" src={game.launchUrl} bind:this={iframe}/>
527
- <div class="BottomGame" part="BottomGame">
533
+ <div class="BottomGame" part="BottomGame" bind:this={buttonsContainer}>
528
534
  <button class="DepositButton" part="DepositButton" on:click='{() => toggleDeposit()}'>{$_('gamePage.deposit')}</button>
529
535
  {#if haspanicbutton === "true"}
530
536
  <div class="PanicSection" part="PanicSection">
@@ -543,7 +549,7 @@
543
549
  </button>
544
550
  {/if}
545
551
  </div>
546
- <p class="Time" part="Time"><span>{time}</span></p>
552
+ <p class="Time" part="Time" bind:this={timeContainer}><span>{time}</span></p>
547
553
  </div>
548
554
  </div>
549
555
  {:else}
@@ -551,7 +557,7 @@
551
557
  <div id="IframeContainer" part="IframeContainer" bind:this={gameFrameContainer} class:FullsScreenLayout={isFullscreen} style="width: {modalFrameWidth}; height: {modalFrameHeight}">
552
558
  <div id="IframeGame" part="IframeGame" bind:this={gameInnerContainer} style="width: {isFullscreen ? '100%' : definitiveIframeWidth}; height: {isFullscreen ? '100%' : definitiveIframeHeight}; max-width: {isFullscreen || !isModal ? 'none' : (game.width ? Math.floor(game.width) + 'px' : '1280px')}; max-height: {isFullscreen || !isModal ? 'none' : (game.height ? (Math.floor(game.height) + 100) + 'px' : '720px')}">
553
559
  <iframe title="Games" class="GamesContainer" part="GamesContainer" aria-hidden="false" src={game.launchUrl} bind:this={iframe}/>
554
- <div class="BottomGame" part="BottomGame">
560
+ <div class="BottomGame" part="BottomGame" bind:this={buttonsContainer}>
555
561
  <div class="ButtonsContainer" part="ButtonsContainer">
556
562
  <button class="LoginButton" part="LoginButton" on:click='{() => toggleLogin()}'>{$_('gamePage.signIn')}</button>
557
563
  <button class="RegisterButton" part="RegisterButton" on:click='{() => toggleRegister()}'>{$_('gamePage.register')}</button>
@@ -566,7 +572,7 @@
566
572
  </button>
567
573
  {/if}
568
574
  </div>
569
- <p class="Time" part="Time"><span>{time}</span></p>
575
+ <p class="Time" part="Time" bind:this={timeContainer}><span>{time}</span></p>
570
576
  </div>
571
577
  </div>
572
578
  {:else}
@@ -600,7 +606,6 @@
600
606
  .BottomGame {
601
607
  padding-left: 60px;
602
608
  padding-right: 60px;
603
- padding-bottom: 15px;
604
609
  min-height: 85px;
605
610
  background-color: var(--emfe-w-color-contrast, #07072A);
606
611
  display: flex;
@@ -631,7 +636,6 @@
631
636
  height: 60px;
632
637
  background-color: var(--emfe-w-color-primary, #D0046C);
633
638
  float: right;
634
- margin-top: 20px;
635
639
  }
636
640
  .GameDetails {
637
641
  display: flex;