@everymatrix/casino-lobby 0.0.222 → 0.0.227
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-lobby.js +1 -3
- package/dist/casino-lobby.js.map +1 -1
- package/index.html +2 -0
- package/package.json +2 -2
- package/src/CasinoLobby.svelte +92 -84
package/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-lobby",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.227",
|
|
4
4
|
"main": "dist/casino-lobby.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": "87c5d90286e7d4214a1e8f9ec974787cb1fd71a6"
|
|
40
40
|
}
|
package/src/CasinoLobby.svelte
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
export let clientstyling:string = '';
|
|
22
22
|
export let clientstylingurl:string = '';
|
|
23
23
|
export let clockformat:string = '';
|
|
24
|
-
export let lobbyid:string
|
|
24
|
+
export let lobbyid:string = '';
|
|
25
25
|
|
|
26
26
|
export let loginurl:string = '';
|
|
27
27
|
export let registerurl:string = '';
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
export let depositevent:string = '';
|
|
32
32
|
|
|
33
33
|
export let mostplayed:string = '';
|
|
34
|
+
export let mostplayedrounds:string = '';
|
|
34
35
|
export let favorites:string = '';
|
|
35
36
|
|
|
36
37
|
export let desktopoffset:string = '0';
|
|
@@ -40,6 +41,9 @@
|
|
|
40
41
|
export let containermaxwidth:string = '';
|
|
41
42
|
export let haspanicbutton:string = 'false';
|
|
42
43
|
|
|
44
|
+
export let activecategory:string = 'LOBBY';
|
|
45
|
+
export let actionevent:string = '';
|
|
46
|
+
|
|
43
47
|
let endpointURL:string;
|
|
44
48
|
let DS:string;
|
|
45
49
|
let language:string;
|
|
@@ -53,14 +57,14 @@
|
|
|
53
57
|
let userAgent:string = window.navigator.userAgent;
|
|
54
58
|
let isLoading:boolean = true;
|
|
55
59
|
|
|
56
|
-
let headerPlaceholderSize:
|
|
60
|
+
let headerPlaceholderSize:string = '0';
|
|
57
61
|
let scrollReference:HTMLElement;
|
|
58
62
|
let scrollTop:boolean = false;
|
|
59
63
|
let customStylingContainer:HTMLElement;
|
|
60
64
|
|
|
61
65
|
setupI18n({ withLocale: 'en', translations: {}});
|
|
62
66
|
|
|
63
|
-
const messageHandler = (e:any) => {
|
|
67
|
+
const messageHandler = (e:any):void => {
|
|
64
68
|
if (e.data) {
|
|
65
69
|
switch(e.data.type) {
|
|
66
70
|
case 'WidgetTopReference':
|
|
@@ -70,7 +74,7 @@
|
|
|
70
74
|
if (!headerPlaceholderSize) {
|
|
71
75
|
scrollReference.scrollIntoView();
|
|
72
76
|
} else {
|
|
73
|
-
window.scrollTo({ top: headerPlaceholderSize });
|
|
77
|
+
window.scrollTo({ top: parseInt(headerPlaceholderSize, 10) });
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
break;
|
|
@@ -80,14 +84,14 @@
|
|
|
80
84
|
playerID = e.data.userID;
|
|
81
85
|
break;
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
case 'CategoryChange':
|
|
88
|
+
activecategory = e.data.item.id;
|
|
85
89
|
break;
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
const checkAttrs = () => {
|
|
94
|
+
const checkAttrs = ():boolean => {
|
|
91
95
|
if (!endpoint) {
|
|
92
96
|
error = "Endpoint is missing! Please provide a valid endpointURL.";
|
|
93
97
|
hasErrors = true;
|
|
@@ -112,25 +116,22 @@
|
|
|
112
116
|
return hasErrors;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
const setActiveLanguage = ():void => {
|
|
120
|
+
setLocale(lang);
|
|
121
|
+
}
|
|
117
122
|
|
|
118
|
-
const initialSetup = () => {
|
|
123
|
+
const initialSetup = ():void => {
|
|
119
124
|
checkAttrs();
|
|
120
125
|
|
|
121
|
-
setLocale(lang);
|
|
122
126
|
endpointURL = endpoint;
|
|
123
127
|
DS = datasource;
|
|
124
128
|
language = lang;
|
|
125
|
-
mostPlayed = mostplayed;
|
|
126
|
-
fav = favorites;
|
|
127
129
|
|
|
128
130
|
hasErrors = false;
|
|
129
|
-
|
|
130
131
|
isLoading = false;
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
const setSession = () => {
|
|
134
|
+
const setSession = ():void => {
|
|
134
135
|
checkSession(endpoint, session).then((res:any) => {
|
|
135
136
|
sessionID = res.Guid;
|
|
136
137
|
playerID = res.UserID;
|
|
@@ -141,23 +142,24 @@
|
|
|
141
142
|
});
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
const setOpSession = () => {
|
|
145
|
+
const setOpSession = ():void => {
|
|
145
146
|
isLoggedIn = true;
|
|
146
147
|
sessionID = opsession;
|
|
147
148
|
}
|
|
148
149
|
|
|
149
|
-
const setClientStyling = () => {
|
|
150
|
+
const setClientStyling = ():void => {
|
|
150
151
|
let sheet = document.createElement('style');
|
|
151
152
|
sheet.innerHTML = clientstyling;
|
|
152
153
|
customStylingContainer.appendChild(sheet);
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
const setClientStylingURL = () => {
|
|
156
|
+
const setClientStylingURL = ():void => {
|
|
156
157
|
displayNone = true;
|
|
157
158
|
|
|
159
|
+
let url:URL = new URL(clientstylingurl);
|
|
158
160
|
let cssFile:HTMLElement = document.createElement('style');
|
|
159
161
|
|
|
160
|
-
fetch(
|
|
162
|
+
fetch(url.href)
|
|
161
163
|
.then((res:any) => res.text())
|
|
162
164
|
.then((data:any) => {
|
|
163
165
|
cssFile.innerHTML = data
|
|
@@ -179,6 +181,7 @@
|
|
|
179
181
|
}
|
|
180
182
|
});
|
|
181
183
|
|
|
184
|
+
$: lang && setActiveLanguage();
|
|
182
185
|
$: session && userid && endpoint && setSession();
|
|
183
186
|
$: endpoint && datasource && lang && mostplayed && favorites && initialSetup();
|
|
184
187
|
$: opsession && setOpSession();
|
|
@@ -187,86 +190,91 @@
|
|
|
187
190
|
</script>
|
|
188
191
|
|
|
189
192
|
<div bind:this={customStylingContainer} class={displayNone ? 'DisplayNone' : ''}>
|
|
190
|
-
{#if hasErrors}
|
|
191
|
-
|
|
192
|
-
{:else}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
datasource={DS}
|
|
214
|
-
lang={language}
|
|
215
|
-
visiblegames="10"
|
|
216
|
-
{alternativesearch}
|
|
217
|
-
favorites={fav}
|
|
218
|
-
mostplayed={mostPlayed}
|
|
219
|
-
{clientstyling}
|
|
220
|
-
{clientstylingurl}
|
|
221
|
-
{lobbyid}
|
|
222
|
-
{containermaxwidth}
|
|
223
|
-
{haspanicbutton}
|
|
224
|
-
></casino-page>
|
|
225
|
-
<casino-modal
|
|
226
|
-
session={session}
|
|
227
|
-
userid={userid}
|
|
228
|
-
endpoint={endpointURL}
|
|
229
|
-
datasource={DS}
|
|
230
|
-
lang={language}
|
|
231
|
-
{clientstyling}
|
|
232
|
-
{clientstylingurl}
|
|
233
|
-
><casino-game-page
|
|
193
|
+
{#if hasErrors}
|
|
194
|
+
<p style="color:var(--emfe-w-color-white, #FFFFFF)">{error}</p>
|
|
195
|
+
{:else}
|
|
196
|
+
<div class="CasinoLobby">
|
|
197
|
+
<div class="WidgetsSection">
|
|
198
|
+
<div class="HeaderPlaceholder" style="height:{headerPlaceholderSize}px"></div>
|
|
199
|
+
<div class="ScrollTop"></div>
|
|
200
|
+
<casino-categories-slider
|
|
201
|
+
endpoint={endpointURL}
|
|
202
|
+
datasource={DS}
|
|
203
|
+
lang={language}
|
|
204
|
+
session={session}
|
|
205
|
+
userid={userid}
|
|
206
|
+
{actionevent}
|
|
207
|
+
{mostplayed}
|
|
208
|
+
{mostplayedrounds}
|
|
209
|
+
{favorites}
|
|
210
|
+
{activecategory}
|
|
211
|
+
{clientstyling}
|
|
212
|
+
{clientstylingurl}
|
|
213
|
+
{containermaxwidth}
|
|
214
|
+
></casino-categories-slider>
|
|
215
|
+
<casino-page
|
|
234
216
|
session={session}
|
|
235
217
|
userid={userid}
|
|
236
218
|
endpoint={endpointURL}
|
|
237
219
|
datasource={DS}
|
|
238
220
|
lang={language}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
221
|
+
visiblegames="10"
|
|
222
|
+
{activecategory}
|
|
223
|
+
{alternativesearch}
|
|
224
|
+
{favorites}
|
|
225
|
+
{mostplayedrounds}
|
|
226
|
+
{mostplayed}
|
|
243
227
|
{clientstyling}
|
|
244
228
|
{clientstylingurl}
|
|
245
|
-
{
|
|
229
|
+
{lobbyid}
|
|
230
|
+
{containermaxwidth}
|
|
246
231
|
{haspanicbutton}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<casino-filter-modal
|
|
250
|
-
{clientstylingurl}
|
|
251
|
-
session={session}
|
|
252
|
-
userid={userid}
|
|
253
|
-
endpoint={endpointURL}
|
|
254
|
-
datasource={DS}
|
|
255
|
-
lang={language}
|
|
256
|
-
{clientstyling}>
|
|
257
|
-
<casino-filter-page
|
|
232
|
+
></casino-page>
|
|
233
|
+
<casino-modal
|
|
258
234
|
session={session}
|
|
259
235
|
userid={userid}
|
|
260
236
|
endpoint={endpointURL}
|
|
261
237
|
datasource={DS}
|
|
262
238
|
lang={language}
|
|
239
|
+
{clientstyling}
|
|
263
240
|
{clientstylingurl}
|
|
241
|
+
><casino-game-page
|
|
242
|
+
session={session}
|
|
243
|
+
userid={userid}
|
|
244
|
+
endpoint={endpointURL}
|
|
245
|
+
datasource={DS}
|
|
246
|
+
lang={language}
|
|
247
|
+
loginevent={loginevent}
|
|
248
|
+
registerevent={registerevent}
|
|
249
|
+
depositevent={depositevent}
|
|
250
|
+
{favorites}
|
|
251
|
+
{clientstyling}
|
|
252
|
+
{clientstylingurl}
|
|
253
|
+
{clockformat}
|
|
254
|
+
{haspanicbutton}
|
|
255
|
+
/>
|
|
256
|
+
</casino-modal>
|
|
257
|
+
<casino-filter-modal
|
|
258
|
+
{clientstylingurl}
|
|
259
|
+
session={session}
|
|
260
|
+
userid={userid}
|
|
261
|
+
endpoint={endpointURL}
|
|
262
|
+
datasource={DS}
|
|
263
|
+
lang={language}
|
|
264
264
|
{clientstyling}>
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
<casino-filter-page
|
|
266
|
+
session={session}
|
|
267
|
+
userid={userid}
|
|
268
|
+
endpoint={endpointURL}
|
|
269
|
+
datasource={DS}
|
|
270
|
+
lang={language}
|
|
271
|
+
{clientstylingurl}
|
|
272
|
+
{clientstyling}>
|
|
273
|
+
</casino-filter-page>
|
|
274
|
+
</casino-filter-modal>
|
|
275
|
+
</div>
|
|
267
276
|
</div>
|
|
268
|
-
|
|
269
|
-
{/if}
|
|
277
|
+
{/if}
|
|
270
278
|
</div>
|
|
271
279
|
|
|
272
280
|
<style lang="scss">
|
|
@@ -282,7 +290,7 @@
|
|
|
282
290
|
}
|
|
283
291
|
|
|
284
292
|
.CasinoLobby {
|
|
285
|
-
background-color: #07072A;
|
|
293
|
+
background-color: var(--emfe-w-color-contrast, #07072A);
|
|
286
294
|
width: 100%;
|
|
287
295
|
margin: 0 auto;
|
|
288
296
|
min-height: 100vh;
|