@everymatrix/casino-page 1.5.3 → 1.5.4
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/dist/casino-page.js +3 -3
- package/dist/casino-page.js.map +1 -1
- package/package.json +2 -2
- package/src/CasinoPage.svelte +59 -173
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-page",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"main": "dist/casino-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": "0515078fefc5290a183afcfb2608cf265f2322c7"
|
|
40
40
|
}
|
package/src/CasinoPage.svelte
CHANGED
|
@@ -116,12 +116,8 @@
|
|
|
116
116
|
|
|
117
117
|
// CasinoPage state
|
|
118
118
|
let myGamesSection:boolean = false;
|
|
119
|
-
let recentSearches:boolean = false;
|
|
120
|
-
let searched:boolean = false;
|
|
121
119
|
let searchFocus:boolean = false;
|
|
122
120
|
let lobbyScreen:boolean = true;
|
|
123
|
-
let mostPlayedScreen:boolean = false;
|
|
124
|
-
let lastPlayedScreen:boolean = false;
|
|
125
121
|
let adjustingScroll:boolean = false;
|
|
126
122
|
let searchIsOn:boolean = false;
|
|
127
123
|
|
|
@@ -176,7 +172,6 @@
|
|
|
176
172
|
});
|
|
177
173
|
|
|
178
174
|
const CategoryChangeHandler = (categoryEvent:any) => {
|
|
179
|
-
searched = false;
|
|
180
175
|
searchValue = '';
|
|
181
176
|
scrollTop = true;
|
|
182
177
|
casinomygames = 'false';
|
|
@@ -189,24 +184,18 @@
|
|
|
189
184
|
lobbyScreen = true;
|
|
190
185
|
myGamesSection = false;
|
|
191
186
|
activeCategory = '';
|
|
192
|
-
mostPlayedScreen = false;
|
|
193
|
-
lastPlayedScreen = false;
|
|
194
187
|
break;
|
|
195
188
|
|
|
196
189
|
case 'MYGAMES':
|
|
197
190
|
casinomygames = 'true';
|
|
198
191
|
lobbyScreen = false;
|
|
199
192
|
myGamesSection = true;
|
|
200
|
-
mostPlayedScreen = false;
|
|
201
|
-
lastPlayedScreen = false;
|
|
202
193
|
activeCategory = '';
|
|
203
194
|
break;
|
|
204
195
|
|
|
205
196
|
case 'FAVORITES':
|
|
206
197
|
lobbyScreen = false;
|
|
207
198
|
myGamesSection = true;
|
|
208
|
-
mostPlayedScreen = false;
|
|
209
|
-
lastPlayedScreen = false;
|
|
210
199
|
activeCategory = '';
|
|
211
200
|
break;
|
|
212
201
|
|
|
@@ -215,7 +204,6 @@
|
|
|
215
204
|
activeCategory = '';
|
|
216
205
|
lobbyScreen = false;
|
|
217
206
|
myGamesSection = true;
|
|
218
|
-
mostPlayedScreen = true;
|
|
219
207
|
}
|
|
220
208
|
break;
|
|
221
209
|
|
|
@@ -223,17 +211,13 @@
|
|
|
223
211
|
if (lastplayed == 'true') {
|
|
224
212
|
activeCategory = '';
|
|
225
213
|
lobbyScreen = false;
|
|
226
|
-
lastPlayedScreen = true;
|
|
227
214
|
myGamesSection = true;
|
|
228
|
-
mostPlayedScreen = false;
|
|
229
215
|
}
|
|
230
216
|
break;
|
|
231
217
|
|
|
232
218
|
default:
|
|
233
219
|
lobbyScreen = false;
|
|
234
220
|
myGamesSection = false;
|
|
235
|
-
mostPlayedScreen = false;
|
|
236
|
-
lastPlayedScreen = false;
|
|
237
221
|
activeCategory = categoryEvent.data.itemId;
|
|
238
222
|
//@TODO: if we remove the settimeout, the postmessage does not execute, at all - weird behaviour
|
|
239
223
|
setTimeout(() => {
|
|
@@ -298,6 +282,9 @@
|
|
|
298
282
|
|
|
299
283
|
case "searchCancelled":
|
|
300
284
|
searchIsOn = false;
|
|
285
|
+
if(activeCategory){
|
|
286
|
+
CategoryChangeHandler({ data: { itemId: activeCategory }});
|
|
287
|
+
}
|
|
301
288
|
break;
|
|
302
289
|
|
|
303
290
|
case "searchActive":
|
|
@@ -379,6 +366,14 @@
|
|
|
379
366
|
});
|
|
380
367
|
}
|
|
381
368
|
|
|
369
|
+
const openFiltersModal = () => {
|
|
370
|
+
window.postMessage({ type: "ShowFilterModal" }, window.location.href);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const clearVendorFilter = () => {
|
|
374
|
+
window.postMessage({ type: "ClearVendorFilters" }, window.location.href);
|
|
375
|
+
}
|
|
376
|
+
|
|
382
377
|
const getGamesIds = (favoritesArray:any = []) => {
|
|
383
378
|
// construct favorite array used to check if game id is not already present in fav list
|
|
384
379
|
favoredGamesCollection = [];
|
|
@@ -792,6 +787,33 @@
|
|
|
792
787
|
</casino-random-game>
|
|
793
788
|
{/if}
|
|
794
789
|
|
|
790
|
+
{#if !lobbyScreen}
|
|
791
|
+
<div class="FiltersButtonsContainer" part="FiltersButtonsContainer">
|
|
792
|
+
{#if numberOfFilters}
|
|
793
|
+
<div class="ClearFilterButtonWrapper" part="ClearFilterButtonWrapper" on:click="{() => clearVendorFilter()}">
|
|
794
|
+
<div class="ClearButton" part="ClearButton">{$_('casinoPage.clear')}
|
|
795
|
+
<span class="ClearIcon" part="ClearIcon">
|
|
796
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
797
|
+
viewBox="0 0 378.303 378.303" style="enable-background:new 0 0 378.303 378.303;" xml:space="preserve">
|
|
798
|
+
<polygon style="fill:var(--emfe-w-color-secondary, #FD2839);" points="378.303,28.285 350.018,0 189.151,160.867 28.285,0 0,28.285 160.867,189.151 0,350.018
|
|
799
|
+
28.285,378.302 189.151,217.436 350.018,378.302 378.303,350.018 217.436,189.151 "/>
|
|
800
|
+
</svg>
|
|
801
|
+
</span>
|
|
802
|
+
</div>
|
|
803
|
+
</div>
|
|
804
|
+
{/if}
|
|
805
|
+
<div class="FilterButtonWrapper" part="FilterButtonWrapper" on:click='{() => {openFiltersModal()}}'>
|
|
806
|
+
<div class="FilterButton" part="FilterButton">{$_('casinoPage.filters')}</div>
|
|
807
|
+
<div class="FilterIconContainer" part="FilterIconContainer">
|
|
808
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 26 26"><defs><style>.a{fill:var(--emfe-w-color-white, #FFFFFF);}</style></defs><path class="a" d="M16.7,32.2a1.654,1.654,0,0,1-.636-.148,1.526,1.526,0,0,1-.867-1.393V20.578L5.433,10.588A1.543,1.543,0,0,1,5,9.491V7.742A1.512,1.512,0,0,1,6.5,6.2h23A1.512,1.512,0,0,1,31,7.742V9.491a1.543,1.543,0,0,1-.433,1.1L20.8,20.578v7.738a1.594,1.594,0,0,1-.52,1.156l-2.6,2.312A1.461,1.461,0,0,1,16.7,32.2ZM6.618,9.431l9.764,10.02a1.543,1.543,0,0,1,.433,1.1v9.813l2.34-2.075V20.519a1.543,1.543,0,0,1,.433-1.1L29.353,9.4V7.831H6.618Z" transform="translate(-5 -6.2)"/></svg>
|
|
809
|
+
<div class="NumberOfFiltersContainer" part="NumberOfFiltersContainer">
|
|
810
|
+
<span class="NumberOfFilters" part="NumberOfFilters">{numberOfFilters}</span>
|
|
811
|
+
</div>
|
|
812
|
+
</div>
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
{/if}
|
|
816
|
+
|
|
795
817
|
{#if isLoading}
|
|
796
818
|
<p class="SearchLoading" part="SearchLoading">{$_('casinoPage.loading')}</p>
|
|
797
819
|
{:else if !searchIsOn}
|
|
@@ -941,161 +963,26 @@
|
|
|
941
963
|
{casinomygames}
|
|
942
964
|
/>
|
|
943
965
|
{:else}
|
|
944
|
-
|
|
945
|
-
{
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
/>
|
|
965
|
-
</div>
|
|
966
|
-
{/if}
|
|
967
|
-
{#if index === 4 && enablejackpotbanner == 'true'}
|
|
968
|
-
<br>
|
|
969
|
-
<jackpot-banner
|
|
970
|
-
title="Egypt Quest"
|
|
971
|
-
currency = {currency || 'RON'}
|
|
972
|
-
gameid = "999"
|
|
973
|
-
{endpoint}
|
|
974
|
-
{lang}
|
|
975
|
-
{backgroundsrc}
|
|
976
|
-
{backgroundsrcmobile}
|
|
977
|
-
{titlelogopath}
|
|
978
|
-
{caticon0}
|
|
979
|
-
{caticon1}
|
|
980
|
-
{caticon2}
|
|
981
|
-
{caticon3}
|
|
982
|
-
{iconlabels}
|
|
983
|
-
{visualstructure}
|
|
984
|
-
{clientstyling}
|
|
985
|
-
{clientstylingurl}
|
|
986
|
-
/>
|
|
987
|
-
{:else if index === 6 && enablejackpotbanner == 'true'}
|
|
988
|
-
<br>
|
|
989
|
-
<jackpot-banner
|
|
990
|
-
title="Jackpot Cards"
|
|
991
|
-
currency = {currency || 'RON'}
|
|
992
|
-
gameid = "998"
|
|
993
|
-
{endpoint}
|
|
994
|
-
{lang}
|
|
995
|
-
backgroundsrc="/assets/background0.jpg"
|
|
996
|
-
backgroundsrcmobile="/assets/background0.jpg"
|
|
997
|
-
titlelogopath = "/assets/jackpots_logo.svg"
|
|
998
|
-
caticon0="/assets/icon0.svg"
|
|
999
|
-
caticon1="/assets/icon1.svg"
|
|
1000
|
-
caticon2="/assets/icon2.svg"
|
|
1001
|
-
caticon3="/assets/icon3.svg"
|
|
1002
|
-
{iconlabels}
|
|
1003
|
-
visualstructure="typeSpread"
|
|
1004
|
-
{clientstyling}
|
|
1005
|
-
{clientstylingurl}
|
|
1006
|
-
/>
|
|
1007
|
-
{/if}
|
|
1008
|
-
{#if index == 7 && enablecollections == 'true'}
|
|
1009
|
-
<casino-collections-providers
|
|
1010
|
-
endpoint = {endpoint.slice(0, -2)}
|
|
1011
|
-
{datasource}
|
|
1012
|
-
{lang}
|
|
1013
|
-
{type}
|
|
1014
|
-
{titletype}
|
|
1015
|
-
{clientstyling}
|
|
1016
|
-
{clientstylingurl}>
|
|
1017
|
-
</casino-collections-providers>
|
|
1018
|
-
{:else if index == (shownCategories.length - 1) && enablecollections == 'true'}
|
|
1019
|
-
<casino-collections-providers
|
|
1020
|
-
endpoint = {endpoint.slice(0, -2)}
|
|
1021
|
-
{datasource}
|
|
1022
|
-
{lang}
|
|
1023
|
-
type='vendor'
|
|
1024
|
-
titletype="logo"
|
|
1025
|
-
{clientstyling}
|
|
1026
|
-
{clientstylingurl}>
|
|
1027
|
-
</casino-collections-providers>
|
|
1028
|
-
{/if}
|
|
1029
|
-
<casino-games-category-section
|
|
1030
|
-
session={session}
|
|
1031
|
-
userid={userid}
|
|
1032
|
-
endpoint={endpoint}
|
|
1033
|
-
datasource={datasource}
|
|
1034
|
-
lang={lang}
|
|
1035
|
-
currency={currency}
|
|
1036
|
-
use:sendCategoryData={category}
|
|
1037
|
-
categoryid={category}
|
|
1038
|
-
categoryindex={index}
|
|
1039
|
-
categorygames="9"
|
|
1040
|
-
favorites={favorites}
|
|
1041
|
-
class="CategoryContainer"
|
|
1042
|
-
style="background-color: {(index % 2 !== 0) ? categorybackground : 'transparent'}"
|
|
1043
|
-
{clientstyling}
|
|
1044
|
-
{clientstylingurl}
|
|
1045
|
-
{livecasino}
|
|
1046
|
-
{visiblegames}
|
|
1047
|
-
{gamepagemodalurl}
|
|
1048
|
-
{integratedgameframedesktop}
|
|
1049
|
-
{integratedgameframemobile}
|
|
1050
|
-
{casinomygames}
|
|
1051
|
-
/>
|
|
1052
|
-
{/each}
|
|
1053
|
-
{:else if myGamesSection}
|
|
1054
|
-
<casino-my-games
|
|
1055
|
-
userid={userid}
|
|
1056
|
-
session={session}
|
|
1057
|
-
endpoint={endpoint}
|
|
1058
|
-
datasource={datasource}
|
|
1059
|
-
lang={lang}
|
|
1060
|
-
currency={currency}
|
|
1061
|
-
favorites={favorites}
|
|
1062
|
-
{clientstyling}
|
|
1063
|
-
{clientstylingurl}
|
|
1064
|
-
{livecasino}
|
|
1065
|
-
{visiblegames}
|
|
1066
|
-
{gamepagemodalurl}
|
|
1067
|
-
{integratedgameframedesktop}
|
|
1068
|
-
{integratedgameframemobile}
|
|
1069
|
-
{translationurl}
|
|
1070
|
-
{mostplayed}
|
|
1071
|
-
{lastplayed}
|
|
1072
|
-
{filteredcategories}
|
|
1073
|
-
{activecategory}
|
|
1074
|
-
categoryindex="0"
|
|
1075
|
-
categoryid="MYGAMES"
|
|
1076
|
-
/>
|
|
1077
|
-
{:else}
|
|
1078
|
-
<casino-games-category-section
|
|
1079
|
-
userid={userid}
|
|
1080
|
-
endpoint={endpoint}
|
|
1081
|
-
datasource={datasource}
|
|
1082
|
-
favorites={favorites}
|
|
1083
|
-
lang={lang}
|
|
1084
|
-
currency={currency}
|
|
1085
|
-
session={session}
|
|
1086
|
-
categoryid={activeCategory}
|
|
1087
|
-
categorygames="9"
|
|
1088
|
-
class="CategoryContainer"
|
|
1089
|
-
{clientstyling}
|
|
1090
|
-
{clientstylingurl}
|
|
1091
|
-
{livecasino}
|
|
1092
|
-
{visiblegames}
|
|
1093
|
-
{gamepagemodalurl}
|
|
1094
|
-
{integratedgameframedesktop}
|
|
1095
|
-
{integratedgameframemobile}
|
|
1096
|
-
{casinomygames}
|
|
1097
|
-
/>
|
|
1098
|
-
{/if}
|
|
966
|
+
<casino-games-category-section
|
|
967
|
+
userid={userid}
|
|
968
|
+
endpoint={endpoint}
|
|
969
|
+
datasource={datasource}
|
|
970
|
+
favorites={favorites}
|
|
971
|
+
lang={lang}
|
|
972
|
+
currency={currency}
|
|
973
|
+
session={session}
|
|
974
|
+
categoryid="RNG$popular-games"
|
|
975
|
+
categorygames="9"
|
|
976
|
+
class="CategoryContainer"
|
|
977
|
+
{clientstyling}
|
|
978
|
+
{clientstylingurl}
|
|
979
|
+
{livecasino}
|
|
980
|
+
{visiblegames}
|
|
981
|
+
{gamepagemodalurl}
|
|
982
|
+
{integratedgameframedesktop}
|
|
983
|
+
{integratedgameframemobile}
|
|
984
|
+
{casinomygames}
|
|
985
|
+
/>
|
|
1099
986
|
{/if}
|
|
1100
987
|
{/if}
|
|
1101
988
|
{#if isLoggedIn && haspanicbutton == "true"}
|
|
@@ -1307,8 +1194,7 @@
|
|
|
1307
1194
|
}
|
|
1308
1195
|
|
|
1309
1196
|
.FiltersButtonsContainer {
|
|
1310
|
-
display:
|
|
1311
|
-
flex-direction: row-reverse;
|
|
1197
|
+
display: flex;
|
|
1312
1198
|
flex: 1;
|
|
1313
1199
|
grid-gap: 20px;
|
|
1314
1200
|
flex-direction: row-reverse;
|