@everymatrix/casino-game-page 1.22.11 → 1.23.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-game-page",
3
- "version": "1.22.11",
3
+ "version": "1.23.1",
4
4
  "main": "dist/casino-game-page.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "1ec5c9d222dc5546dc0ef485ea93807daa2bb50c"
38
+ "gitHead": "4844f167efeb93d55d079fc27381a959fe9c5a65"
39
39
  }
@@ -30,6 +30,7 @@
30
30
  export let loginevent:string = '';
31
31
  export let registerevent:string = '';
32
32
  export let depositevent:string = '';
33
+ export let shortcashierenabled: string = '';
33
34
 
34
35
  export let clockformat:string = '';
35
36
  export let haspanicbutton:string = 'false';
@@ -436,20 +437,23 @@
436
437
  }
437
438
  }
438
439
 
439
- const toggleDeposit = ():void => {
440
- if (depositevent) {
440
+ const toggleDeposit = (mobileView:boolean):void => {
441
+
442
+ if (shortcashierenabled && !mobileView) {
443
+ window.postMessage({ type: 'OpenShortCashier' }, window.location.href);
444
+ } else if (depositevent) {
441
445
  window.postMessage({ type: depositevent }, window.location.href);
442
446
  window.postMessage({ type: 'ModalClosed' }, window.location.href);
443
-
444
- //Analytics event
445
- if(typeof gtag == 'function'){
446
- gtag('event', 'GoToDeposit', {
447
- 'context': 'GamePage'
448
- });
449
- }
450
447
  }
451
448
 
452
- if (depositurl) {
449
+ //Analytics event
450
+ if(typeof gtag == 'function'){
451
+ gtag('event', 'GoToDeposit', {
452
+ 'context': 'IntegratedGamePage'
453
+ });
454
+ }
455
+
456
+ if (depositurl && !shortcashierenabled) {
453
457
  // @ts-ignore
454
458
  window.location = depositurl;
455
459
  }
@@ -660,7 +664,7 @@
660
664
  <h3>{game.name}</h3>
661
665
  <img src={game.thumbnail} class="GameThumbnail" alt="game thumbnail" loading="lazy" />
662
666
  <div class="ButtonsContainer">
663
- <button class="DepositButton" on:click='{() => toggleDeposit()}'>{$_('deposit')}</button>
667
+ <button class="DepositButton" on:click='{() => toggleDeposit(mobileView)}'>{$_('deposit')}</button>
664
668
  <button class="PlayNowButton" on:click='{() => {openGameWindow(game)}}'>{$_('playNow')}</button>
665
669
  </div>
666
670
  {#if haspanicbutton === "true"}
@@ -698,7 +702,7 @@
698
702
  <div id="IframeGame" bind:this={gameInnerContainer} style="{gameStyle}">
699
703
  <iframe title="Games" id="IframeGame" class="GamesContainer" aria-hidden="false" src={game.launchUrl} bind:this={iframe}/>
700
704
  <div class="BottomGame {haspanicbutton == 'true' ? 'BottomGamePanicSection' : ''}" bind:this={buttonsContainer}>
701
- <button class="DepositButton" on:click='{() => toggleDeposit()}'>{$_('deposit')}</button>
705
+ <button class="DepositButton" on:click='{() => toggleDeposit(mobileView)}'>{$_('deposit')}</button>
702
706
  <p class="Time" bind:this={timeContainer}><span>{time}</span></p>
703
707
  {#if haspanicbutton === "true"}
704
708
  <div class="PanicSection">