@everymatrix/casino-game-page 1.2.1 → 1.3.0
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": "1.
|
3
|
+
"version": "1.3.0",
|
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": "
|
39
|
+
"gitHead": "ac0e71f6ea97bb7428ee75f5667c1408cbdc3146"
|
40
40
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
export let userid:string = ''; // Value for UserID;
|
22
22
|
export let clientstyling:string = '';
|
23
23
|
export let clientstylingurl:string = '';
|
24
|
-
export let
|
24
|
+
export let translationurl:string = '';
|
25
25
|
export let favorites:string = '';
|
26
26
|
|
27
27
|
export let loginurl:string = '';
|
@@ -85,7 +85,7 @@
|
|
85
85
|
setupI18n({ withLocale: 'en', translations: {}});
|
86
86
|
|
87
87
|
const setTranslationUrl = ():void => {
|
88
|
-
let url:string =
|
88
|
+
let url:string = translationurl;
|
89
89
|
|
90
90
|
fetch(url).then((res:any) => res.json())
|
91
91
|
.then((res) => {
|
@@ -108,11 +108,9 @@
|
|
108
108
|
url.searchParams.append('language', lang);
|
109
109
|
// @TODO wtf? session check or go home
|
110
110
|
// Maybe we should check if the session is valid, somehow?
|
111
|
-
isLoading = false;
|
112
111
|
|
113
112
|
if (sessionID && sessionID.length > 0) {
|
114
113
|
isLoggedIn = true;
|
115
|
-
isLoading = false;
|
116
114
|
|
117
115
|
url.searchParams.append('_sid', sessionID)
|
118
116
|
url.searchParams.append('funMode', 'false')
|
@@ -135,6 +133,7 @@
|
|
135
133
|
.then((res:any) => res.json())
|
136
134
|
.then((data:any) => {
|
137
135
|
game = formatGameLaunchUrl(data[0]);
|
136
|
+
isLoading = false;
|
138
137
|
if (game.launchUrl) {
|
139
138
|
detailsObtained = true;
|
140
139
|
funMode = playforfun == 'true' ? game.hasFunMode : false;
|
@@ -152,6 +151,8 @@
|
|
152
151
|
maximizeGameFrame();
|
153
152
|
}
|
154
153
|
}
|
154
|
+
}).finally(() => {
|
155
|
+
isLoading = false;
|
155
156
|
});
|
156
157
|
window.postMessage({ type: 'RequestModalSize' }, window.location.href);
|
157
158
|
}
|
@@ -283,10 +284,13 @@
|
|
283
284
|
.then((res:any) => res.json())
|
284
285
|
.then((data:any) => {
|
285
286
|
game = formatGameLaunchUrl(data[0]);
|
287
|
+
isLoading = false;
|
286
288
|
if (game.launchUrl) {
|
287
289
|
game.isFavored = setGameData(game, gameFunMode);
|
288
290
|
}
|
289
|
-
})
|
291
|
+
}).finally(() => {
|
292
|
+
isLoading = false;
|
293
|
+
});;
|
290
294
|
}
|
291
295
|
|
292
296
|
const resizeIframeIfNotVisible = (): void => {
|
@@ -594,7 +598,7 @@
|
|
594
598
|
$: endpoint && gameid && lang && createGameURL(gameid, true);
|
595
599
|
$: session && userid && endpoint && setSession();
|
596
600
|
$: checksession == 'false' && session && endpoint && setSession();
|
597
|
-
$:
|
601
|
+
$: translationurl && setTranslationUrl();
|
598
602
|
$: clientstyling && customStylingContainer && setClientStyling();
|
599
603
|
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
600
604
|
$: (showModal == 'true') && panicButton && addEventsToDisplayedElements();
|
@@ -608,7 +612,7 @@
|
|
608
612
|
{#if hasErrors}
|
609
613
|
<p class="SearchLoading" part="SearchLoading">500 Error - Internal Server Error.</p>
|
610
614
|
{:else}
|
611
|
-
<div class="GamePageBackground" style="background:{!
|
615
|
+
<div class="GamePageBackground" style="background:{!mobileView? `url(${game.backgroundImageUrl})`: ''}; background-size: cover" bind:this={gamePageBackground}>
|
612
616
|
<div class="CasinoGamePageContainer" part="CasinoGamePageContainer" style="background: rgba(0, 0, 0, 0.5)">
|
613
617
|
{#if detailsObtained}
|
614
618
|
{#if mobileView}
|