@everymatrix/casino-game-page 1.0.15 → 1.0.69
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/es2015/casino-game-page.cjs +1 -0
- package/es2015/casino-game-page.js +16 -0
- package/package.json +14 -34
- package/README.md +0 -30
- package/dist/casino-game-page.js +0 -2
- package/dist/casino-game-page.js.map +0 -1
- package/index.html +0 -43
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -67
- package/src/CasinoGamePage.svelte +0 -990
- package/src/i18n.js +0 -25
- package/src/index.ts +0 -4
- package/src/translations.js +0 -156
- package/stories/CasinoGamePage.stories.js +0 -13
- package/tsconfig.json +0 -6
@@ -1,990 +0,0 @@
|
|
1
|
-
<svelte:options tag={null} />
|
2
|
-
|
3
|
-
<script lang="ts">
|
4
|
-
import { onMount } from "svelte";
|
5
|
-
import { isMobile, checkSession, getDevice } from 'rvhelper';
|
6
|
-
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
7
|
-
import { GamePageTranslations } from './translations';
|
8
|
-
|
9
|
-
// Native bridge
|
10
|
-
import {
|
11
|
-
isNative,
|
12
|
-
call as callNative,
|
13
|
-
registerEventListener as registerNativeEventListener,
|
14
|
-
} from 'js-native-bridge';
|
15
|
-
|
16
|
-
import moment from 'moment';
|
17
|
-
|
18
|
-
export let endpoint:string = '';
|
19
|
-
export let lang:string = ''; // Language
|
20
|
-
export let session:string = ''; // Value for sessionID
|
21
|
-
export let userid:string = ''; // Value for UserID;
|
22
|
-
export let clientstyling:string = '';
|
23
|
-
export let clientstylingurl:string = '';
|
24
|
-
export let translationUrl:string = '';
|
25
|
-
export let favorites:string = '';
|
26
|
-
|
27
|
-
export let loginurl:string = '';
|
28
|
-
export let registerurl:string = '';
|
29
|
-
export let depositurl:string = '';
|
30
|
-
export let loginevent:string = '';
|
31
|
-
export let registerevent:string = '';
|
32
|
-
export let depositevent:string = '';
|
33
|
-
|
34
|
-
export let clockformat:string = '';
|
35
|
-
export let haspanicbutton:string = 'false';
|
36
|
-
export let playforfun:string = 'true';
|
37
|
-
export let checksession:string = 'true';
|
38
|
-
export let integratedgameframedesktop:string = 'false';
|
39
|
-
export let integratedgameframemobile:string = 'false';
|
40
|
-
export let gameid:string = '';
|
41
|
-
|
42
|
-
let time:Object;
|
43
|
-
let iframe:any;
|
44
|
-
|
45
|
-
let isLoggedIn:boolean = false;
|
46
|
-
let hasErrors:boolean = false;
|
47
|
-
let isLoading:boolean = true;
|
48
|
-
|
49
|
-
let playerID:string;
|
50
|
-
let sessionID:string;
|
51
|
-
|
52
|
-
let panicButton:HTMLElement;
|
53
|
-
let panicLoading:boolean = false;
|
54
|
-
let timer: number = 0;
|
55
|
-
let timerInterval:any;
|
56
|
-
|
57
|
-
let game:any;
|
58
|
-
let detailsObtained:boolean = false;
|
59
|
-
let funMode:boolean = false;
|
60
|
-
let anonymousFunMode:boolean = false;
|
61
|
-
let isModal:boolean = true;
|
62
|
-
|
63
|
-
let gameFrameContainer:HTMLElement;
|
64
|
-
let gameInnerContainer:HTMLElement;
|
65
|
-
let gamePageBackground:HTMLElement;
|
66
|
-
let isFullscreen:boolean = false;
|
67
|
-
let modalFrameWidth:number;
|
68
|
-
let modalFrameHeight:number;
|
69
|
-
let gameFrameWidth:number;
|
70
|
-
let gameFrameHeight:number;
|
71
|
-
let definitiveIframeWidth:string;
|
72
|
-
let definitiveIframeHeight:string;
|
73
|
-
let userAgent:any = window.navigator.userAgent;
|
74
|
-
let mobileView:boolean = false;
|
75
|
-
let favoriteGames: Array<Object> = [];
|
76
|
-
let customStylingContainer:HTMLElement;
|
77
|
-
let buttonsContainer:HTMLElement;
|
78
|
-
let timeContainer:HTMLElement;
|
79
|
-
let isOnNative:boolean = false;
|
80
|
-
let showModal:string = 'false';
|
81
|
-
|
82
|
-
let gameStyle = '';
|
83
|
-
let gameRationedHeight: number;
|
84
|
-
|
85
|
-
setupI18n({ withLocale: 'en', translations: {}});
|
86
|
-
|
87
|
-
const setTranslationUrl = ():void => {
|
88
|
-
let url:string = translationUrl;
|
89
|
-
|
90
|
-
fetch(url).then((res:any) => res.json())
|
91
|
-
.then((res) => {
|
92
|
-
Object.keys(res).forEach((item:any):void => {
|
93
|
-
addNewMessages(item, res[item]);
|
94
|
-
});
|
95
|
-
}).catch((err:any) => {
|
96
|
-
console.log(err);
|
97
|
-
});
|
98
|
-
}
|
99
|
-
|
100
|
-
Object.keys(GamePageTranslations).forEach((item) => {
|
101
|
-
addNewMessages(item, GamePageTranslations[item]);
|
102
|
-
});
|
103
|
-
|
104
|
-
// @TODO game typescript model type
|
105
|
-
const formatGameLaunchUrl = (game:any):void => {
|
106
|
-
let url:URL = new URL(game.launchUrl);
|
107
|
-
|
108
|
-
url.searchParams.append('language', lang);
|
109
|
-
// @TODO wtf? session check or go home
|
110
|
-
// Maybe we should check if the session is valid, somehow?
|
111
|
-
isLoading = false;
|
112
|
-
|
113
|
-
if (sessionID && sessionID.length > 0) {
|
114
|
-
isLoggedIn = true;
|
115
|
-
isLoading = false;
|
116
|
-
|
117
|
-
url.searchParams.append('_sid', sessionID)
|
118
|
-
url.searchParams.append('funMode', 'false')
|
119
|
-
}
|
120
|
-
|
121
|
-
game.launchUrl = url;
|
122
|
-
|
123
|
-
return game;
|
124
|
-
}
|
125
|
-
|
126
|
-
const createGameURL = (gameId:string, modal?:boolean):void => {
|
127
|
-
let url:URL = new URL(`${endpoint}/casino/games/${gameId}`);
|
128
|
-
|
129
|
-
url.searchParams.append('language', lang);
|
130
|
-
url.searchParams.append('expand', 'vendor');
|
131
|
-
|
132
|
-
isModal = modal || false;
|
133
|
-
|
134
|
-
fetch(url.href)
|
135
|
-
.then((res:any) => res.json())
|
136
|
-
.then((data:any) => {
|
137
|
-
game = formatGameLaunchUrl(data[0]);
|
138
|
-
if (game.launchUrl) {
|
139
|
-
detailsObtained = true;
|
140
|
-
funMode = playforfun == 'true' ? game.hasFunMode : false;
|
141
|
-
anonymousFunMode = playforfun == 'true' ? game.hasAnonymousFunMode : false;
|
142
|
-
}
|
143
|
-
}, (err:any) => {
|
144
|
-
console.error('There was an error', err);
|
145
|
-
hasErrors = true;
|
146
|
-
}).then(() => {
|
147
|
-
if (gameFrameContainer) {
|
148
|
-
if (isModal) {
|
149
|
-
keepIframeRatio();
|
150
|
-
} else {
|
151
|
-
maximizeGameFrame();
|
152
|
-
}
|
153
|
-
}
|
154
|
-
});
|
155
|
-
window.postMessage({ type: 'RequestModalSize' }, window.location.href);
|
156
|
-
}
|
157
|
-
|
158
|
-
const addEventsToDisplayedElements = () => {
|
159
|
-
panicButton?.addEventListener("mousedown", startInterval, false);
|
160
|
-
panicButton?.addEventListener('touchstart', startInterval, false)
|
161
|
-
|
162
|
-
// on mouseup stop interval count
|
163
|
-
panicButton?.addEventListener("mouseup", endInterval, false);
|
164
|
-
panicButton?.addEventListener("touchend", endInterval, false);
|
165
|
-
}
|
166
|
-
|
167
|
-
const removeEventsToDisplayedElements = ():void => {
|
168
|
-
panicLoading = false;
|
169
|
-
panicButton?.removeEventListener("mousedown", startInterval);
|
170
|
-
panicButton?.removeEventListener('touchstart', startInterval)
|
171
|
-
|
172
|
-
// on mouseup stop interval count
|
173
|
-
panicButton?.removeEventListener("mouseup", endInterval);
|
174
|
-
panicButton?.removeEventListener("touchend", endInterval);
|
175
|
-
}
|
176
|
-
|
177
|
-
const messageHandler = (e:any):void => {
|
178
|
-
switch (e.data.type) {
|
179
|
-
case 'GameLaunchID':
|
180
|
-
createGameURL(e.data.gameId, true);
|
181
|
-
break;
|
182
|
-
|
183
|
-
case 'ShowGameModal':
|
184
|
-
showModal = 'true';
|
185
|
-
break;
|
186
|
-
|
187
|
-
case 'OpenGameFrame':
|
188
|
-
showModal = 'true';
|
189
|
-
break;
|
190
|
-
|
191
|
-
case 'LaunchGameFrame':
|
192
|
-
openGameFrame(e.data.gameId, e.data.gameFunMode);
|
193
|
-
break;
|
194
|
-
|
195
|
-
case 'ModalClosed':
|
196
|
-
window.postMessage({ type: 'EnableScroll'}, window.location.href);
|
197
|
-
// the timeout is necessary in order to sync with the closing of the modal frame and provide a smoother transition
|
198
|
-
showModal = 'false';
|
199
|
-
removeEventsToDisplayedElements();
|
200
|
-
if(isMobile(userAgent)) {
|
201
|
-
setTimeout(() => { detailsObtained = integratedgameframemobile === "true";}, 500);
|
202
|
-
} else {
|
203
|
-
setTimeout(() => { detailsObtained = integratedgameframedesktop === "true";}, 500);
|
204
|
-
}
|
205
|
-
break;
|
206
|
-
|
207
|
-
case 'UserSessionID':
|
208
|
-
if (e.data.session.length > 0) {
|
209
|
-
sessionID = e.data.session;
|
210
|
-
playerID = e.data.userID;
|
211
|
-
isLoggedIn = true;
|
212
|
-
|
213
|
-
let interval = setInterval(() => {
|
214
|
-
if (game) {
|
215
|
-
let url:any = new URL(game.launchUrl);
|
216
|
-
|
217
|
-
if (!url.searchParams.get('_sid')) {
|
218
|
-
url.searchParams.append('_sid', sessionID);
|
219
|
-
}
|
220
|
-
|
221
|
-
if (!url.searchParams.get('funMode')) {
|
222
|
-
url.searchParams.append('funMode', false);
|
223
|
-
}
|
224
|
-
|
225
|
-
if (!url.searchParams.get('_sid')) {
|
226
|
-
url.searchParams.append('language', lang);
|
227
|
-
}
|
228
|
-
|
229
|
-
game.launchUrl = url;
|
230
|
-
|
231
|
-
clearInterval(interval);
|
232
|
-
}
|
233
|
-
}, 250);
|
234
|
-
}
|
235
|
-
break;
|
236
|
-
|
237
|
-
case 'ModalSize':
|
238
|
-
modalFrameWidth = e.data.modalContainerSize.modalWidth;
|
239
|
-
modalFrameHeight = e.data.modalContainerSize.modalHeight;
|
240
|
-
break;
|
241
|
-
|
242
|
-
case 'UpdateCategoryFavoriteGames':
|
243
|
-
if (e.data.receivedFavoriteResults) {
|
244
|
-
favoriteGames = e.data.receivedFavoriteResults.items;
|
245
|
-
}
|
246
|
-
break;
|
247
|
-
}
|
248
|
-
}
|
249
|
-
|
250
|
-
const checkFavorite = (gameId:string):boolean => {
|
251
|
-
if (favoriteGames.findIndex(obj => obj.id == gameId) !== -1) {
|
252
|
-
return true;
|
253
|
-
} else {
|
254
|
-
return false;
|
255
|
-
}
|
256
|
-
}
|
257
|
-
|
258
|
-
const toggleFavoriteGame = (id:any):void => {
|
259
|
-
let triggerFactor = "gamepage";
|
260
|
-
|
261
|
-
if (game.isFavored) {
|
262
|
-
window.postMessage({ type: 'SetUnfavoredGame', id, triggerFactor }, window.location.href);
|
263
|
-
game.isFavored = false;
|
264
|
-
} else {
|
265
|
-
window.postMessage({ type: 'SetFavoredGame', id, triggerFactor }, window.location.href);
|
266
|
-
game.isFavored = true;
|
267
|
-
}
|
268
|
-
}
|
269
|
-
|
270
|
-
const setGameData = (game, gameFunMode) => {
|
271
|
-
anonymousFunMode = playforfun == 'true' ? game.hasAnonymousFunMode : false;
|
272
|
-
funMode = playforfun == 'true' ? gameFunMode : false;
|
273
|
-
detailsObtained = true;
|
274
|
-
return checkFavorite(game.id);
|
275
|
-
}
|
276
|
-
|
277
|
-
const openGameFrame = (gameId:string, gameFunMode:boolean):void => {
|
278
|
-
let url:URL = new URL(`${endpoint}/casino/games/${gameId}`);
|
279
|
-
|
280
|
-
url.searchParams.append('language', lang);
|
281
|
-
|
282
|
-
fetch(url.href)
|
283
|
-
.then((res:any) => res.json())
|
284
|
-
.then((data:any) => {
|
285
|
-
game = formatGameLaunchUrl(data[0]);
|
286
|
-
if (game.launchUrl) {
|
287
|
-
game.isFavored = setGameData(game, gameFunMode);
|
288
|
-
}
|
289
|
-
});
|
290
|
-
}
|
291
|
-
|
292
|
-
const resizeIframeIfNotVisible = (): void => {
|
293
|
-
if (isFullscreen) return;
|
294
|
-
|
295
|
-
const resizeCallback = (entries, observer): void => {
|
296
|
-
const maxIntersectionRatio = 0.5;
|
297
|
-
const intersectionRatio = entries[0].intersectionRatio;
|
298
|
-
const isIntersecting = entries[0].isIntersecting;
|
299
|
-
const gameFrameContainerHeight = parseInt(
|
300
|
-
getComputedStyle(gameFrameContainer).height
|
301
|
-
);
|
302
|
-
|
303
|
-
if (!gameRationedHeight)
|
304
|
-
gameRationedHeight =
|
305
|
-
gameFrameContainerHeight *
|
306
|
-
Math.max(intersectionRatio, maxIntersectionRatio);
|
307
|
-
|
308
|
-
gameFrameContainer.style.height = `${gameRationedHeight}px`;
|
309
|
-
gameInnerContainer.style.height = `${gameRationedHeight}px`;
|
310
|
-
|
311
|
-
if(isIntersecting){
|
312
|
-
gamePageBackground.style.height = `${gameFrameContainer.style.height}px`;
|
313
|
-
}
|
314
|
-
|
315
|
-
observer.unobserve(gameFrameContainer);
|
316
|
-
};
|
317
|
-
|
318
|
-
const options = {
|
319
|
-
threshold: 0,
|
320
|
-
};
|
321
|
-
|
322
|
-
const observer = new IntersectionObserver(resizeCallback, options);
|
323
|
-
observer.observe(gameFrameContainer);
|
324
|
-
};
|
325
|
-
|
326
|
-
const maximizeGameFrame = ():void => {
|
327
|
-
modalFrameWidth = game.width;
|
328
|
-
modalFrameHeight = game.height;
|
329
|
-
|
330
|
-
definitiveIframeWidth = `${game.width}px`;
|
331
|
-
definitiveIframeHeight = `${game.height}px`;
|
332
|
-
|
333
|
-
gameFrameWidth = game.width;
|
334
|
-
gameFrameHeight = game.height;
|
335
|
-
|
336
|
-
keepIframeRatio();
|
337
|
-
}
|
338
|
-
|
339
|
-
// Start section: keep aspect ratio for iframe on resize
|
340
|
-
const keepIframeRatio = ():void => {
|
341
|
-
let iframeContainer = getComputedStyle(gameFrameContainer);
|
342
|
-
let gameFrame = getComputedStyle(gameInnerContainer);
|
343
|
-
let gameContainerWidth = parseInt(iframeContainer.width.slice(0, -2));
|
344
|
-
let gameContainerHeight = parseInt(iframeContainer.height.slice(0, -2));
|
345
|
-
const iframeRatio = game.width/(game.height + 100);
|
346
|
-
|
347
|
-
|
348
|
-
gameFrameWidth = parseInt(game.width);
|
349
|
-
gameFrameHeight = parseInt(game.height);
|
350
|
-
|
351
|
-
// resize logic for maintaining game ratio when resizing
|
352
|
-
gameFrameWidth = gameContainerWidth * iframeRatio;
|
353
|
-
|
354
|
-
definitiveIframeWidth = gameFrameWidth ? `${Math.floor(gameFrameWidth)}px` : "1280px";
|
355
|
-
definitiveIframeHeight = gameFrameHeight ? `${Math.floor(gameFrameHeight)}px` : "720px";
|
356
|
-
|
357
|
-
calculateFrameProportions();
|
358
|
-
}
|
359
|
-
|
360
|
-
const openGameWindow = (game:any):void => {
|
361
|
-
if (!isOnNative) return isMobile(userAgent) ? determineGameFrameState(integratedgameframemobile) : determineGameFrameState(integratedgameframedesktop);
|
362
|
-
let data = {
|
363
|
-
url: game.launchUrl,
|
364
|
-
id: game.id,
|
365
|
-
vendor: game.vendor.name
|
366
|
-
}
|
367
|
-
callNative('OPEN_GAME', data);
|
368
|
-
}
|
369
|
-
|
370
|
-
const determineGameFrameState = (gameState:string):void => {
|
371
|
-
if(gameState == 'false') {
|
372
|
-
window.open(game.launchUrl, '_blank');
|
373
|
-
} else if(gameState == 'true') {
|
374
|
-
window.postMessage({ type: 'OpenIntegratedGameFrame', gameId: game.id }, window.location.href);
|
375
|
-
}
|
376
|
-
}
|
377
|
-
|
378
|
-
const resizeHandler = ():void => {
|
379
|
-
// sent to modal component a flag (detailsObtained) by witch to determine if a game is open
|
380
|
-
window.postMessage({ type: 'GameStateOnResize', detailsObtained }, window.location.href);
|
381
|
-
// make sure that a game is open before trying to get the element properties
|
382
|
-
if (detailsObtained) {
|
383
|
-
if (gameFrameContainer) {
|
384
|
-
keepIframeRatio();
|
385
|
-
}
|
386
|
-
window.addEventListener('ModalSize', messageHandler, false);
|
387
|
-
}
|
388
|
-
}
|
389
|
-
|
390
|
-
// End section: keep aspect ratio for iframe on resize
|
391
|
-
const toggleLogin = ():void => {
|
392
|
-
if (loginevent) {
|
393
|
-
window.postMessage({ type: loginevent, transition: 'Login' }, window.location.href);
|
394
|
-
window.postMessage({ type: 'ModalClosed' }, window.location.href);
|
395
|
-
}
|
396
|
-
|
397
|
-
if (loginurl) {
|
398
|
-
// @ts-ignore
|
399
|
-
window.location = loginurl;
|
400
|
-
}
|
401
|
-
|
402
|
-
//Analytics event
|
403
|
-
if(typeof gtag == 'function'){
|
404
|
-
gtag('event', 'OpenLoginModal', {
|
405
|
-
'context': 'GeneralPlayerRegisterForm'
|
406
|
-
});
|
407
|
-
}
|
408
|
-
}
|
409
|
-
|
410
|
-
const toggleRegister = ():void => {
|
411
|
-
if (registerevent) {
|
412
|
-
window.postMessage({ type: registerevent, transition: 'Register' }, window.location.href);
|
413
|
-
window.postMessage({ type: 'ModalClosed' }, window.location.href);
|
414
|
-
}
|
415
|
-
|
416
|
-
if (registerurl) {
|
417
|
-
// @ts-ignore
|
418
|
-
window.location = registerurl;
|
419
|
-
}
|
420
|
-
|
421
|
-
//Analytics event
|
422
|
-
if(typeof gtag == 'function'){
|
423
|
-
gtag('event', 'OpenRegisterModal', {
|
424
|
-
'context': 'GeneralPlayerRegisterForm'
|
425
|
-
});
|
426
|
-
}
|
427
|
-
}
|
428
|
-
|
429
|
-
const toggleDeposit = ():void => {
|
430
|
-
if (depositevent) {
|
431
|
-
window.postMessage({ type: depositevent }, window.location.href);
|
432
|
-
window.postMessage({ type: 'ModalClosed' }, window.location.href);
|
433
|
-
|
434
|
-
//Analytics event
|
435
|
-
if(typeof gtag == 'function'){
|
436
|
-
gtag('event', 'GoToDeposit', {
|
437
|
-
'context': 'GamePage'
|
438
|
-
});
|
439
|
-
}
|
440
|
-
}
|
441
|
-
|
442
|
-
if (depositurl) {
|
443
|
-
// @ts-ignore
|
444
|
-
window.location = depositurl;
|
445
|
-
}
|
446
|
-
}
|
447
|
-
|
448
|
-
if (document.addEventListener) {
|
449
|
-
document.addEventListener('webkitfullscreenchange', exitHandler, false);
|
450
|
-
document.addEventListener('mozfullscreenchange', exitHandler, false);
|
451
|
-
document.addEventListener('fullscreenchange', exitHandler, false);
|
452
|
-
document.addEventListener('MSFullscreenChange', exitHandler, false);
|
453
|
-
}
|
454
|
-
|
455
|
-
function exitHandler() {
|
456
|
-
if (!document.webkitIsFullScreen && !document.mozFullScreen && !document.msFullscreenElement && isFullscreen) {
|
457
|
-
handleIframeSize();
|
458
|
-
}
|
459
|
-
}
|
460
|
-
|
461
|
-
const handleIframeSize = () => {
|
462
|
-
if ((document as any).fullscreenEnabled ||
|
463
|
-
(document as any).webkitFullscreenEnabled ||
|
464
|
-
(document as any).mozFullScreenEnabled ||
|
465
|
-
(document as any).msFullscreenEnabled) {
|
466
|
-
if (isFullscreen) {
|
467
|
-
if (document.exitFullscreen) {
|
468
|
-
document.exitFullscreen(); // firefox uses the same exit function
|
469
|
-
} else if ( document.webkitExitFullscreen) {
|
470
|
-
document.webkitExitFullscreen();
|
471
|
-
} else if ( document.msExitFullscreen) {
|
472
|
-
document.msExitFullscreen();
|
473
|
-
}
|
474
|
-
isFullscreen = false;
|
475
|
-
} else {
|
476
|
-
if (gameFrameContainer.requestFullscreen) {
|
477
|
-
gameFrameContainer.requestFullscreen();
|
478
|
-
} else if (gameFrameContainer.webkitRequestFullscreen) {
|
479
|
-
gameFrameContainer.webkitRequestFullscreen();
|
480
|
-
} else if (gameFrameContainer.mozRequestFullScreen) {
|
481
|
-
gameFrameContainer.mozRequestFullScreen();
|
482
|
-
} else if (gameFrameContainer.msRequestFullscreen) {
|
483
|
-
gameFrameContainer.msRequestFullscreen();
|
484
|
-
}
|
485
|
-
isFullscreen = true;
|
486
|
-
}
|
487
|
-
}
|
488
|
-
}
|
489
|
-
|
490
|
-
const refreshTime = ():void => {
|
491
|
-
if (clockformat) {
|
492
|
-
time = moment().format(clockformat);
|
493
|
-
} else {
|
494
|
-
time = moment().format('LTS');
|
495
|
-
}
|
496
|
-
}
|
497
|
-
|
498
|
-
const timeInterval = setInterval(():void => {
|
499
|
-
refreshTime();
|
500
|
-
}, 100);
|
501
|
-
|
502
|
-
const setActiveLanguage = ():void => {
|
503
|
-
setLocale(lang);
|
504
|
-
|
505
|
-
mobileView = isMobile(userAgent);
|
506
|
-
}
|
507
|
-
|
508
|
-
const setSession = ():void => {
|
509
|
-
if (checksession == 'true') {
|
510
|
-
checkSession(endpoint, session).then((res:any) => {
|
511
|
-
sessionID = res.Guid;
|
512
|
-
playerID = res.UserID;
|
513
|
-
isLoggedIn = true;
|
514
|
-
}, (err:any) => {
|
515
|
-
isLoggedIn = false;
|
516
|
-
console.error('err on session', err);
|
517
|
-
});
|
518
|
-
} else {
|
519
|
-
sessionID = session;
|
520
|
-
isLoggedIn = true;
|
521
|
-
}
|
522
|
-
|
523
|
-
}
|
524
|
-
|
525
|
-
const setClientStyling = ():void => {
|
526
|
-
let sheet = document.createElement('style');
|
527
|
-
sheet.innerHTML = clientstyling;
|
528
|
-
customStylingContainer.appendChild(sheet);
|
529
|
-
}
|
530
|
-
|
531
|
-
const setClientStylingURL = ():void => {
|
532
|
-
let cssFile:HTMLElement = document.createElement('style');
|
533
|
-
|
534
|
-
if (clientstylingurl) {
|
535
|
-
let url:URL = new URL(clientstylingurl);
|
536
|
-
|
537
|
-
fetch(url.href)
|
538
|
-
.then((res:any) => res.text())
|
539
|
-
.then((data:any) => {
|
540
|
-
cssFile.innerHTML = data
|
541
|
-
|
542
|
-
if (customStylingContainer) {
|
543
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile); }, 1);
|
544
|
-
}
|
545
|
-
});
|
546
|
-
}
|
547
|
-
}
|
548
|
-
|
549
|
-
const startInterval = (e:any):void => {
|
550
|
-
timer = 0;
|
551
|
-
|
552
|
-
timerInterval = setInterval(() => {
|
553
|
-
timer += 1;
|
554
|
-
panicLoading = true;
|
555
|
-
|
556
|
-
if (timer >= 3) {
|
557
|
-
window.postMessage({type: 'PanicButtonClicked'}, window.location.href);
|
558
|
-
clearInterval(timerInterval)
|
559
|
-
}
|
560
|
-
}, 1000);
|
561
|
-
}
|
562
|
-
|
563
|
-
const endInterval = (e:any):void => {
|
564
|
-
if (timer < 3) {
|
565
|
-
panicLoading = false;
|
566
|
-
}
|
567
|
-
clearInterval(timerInterval);
|
568
|
-
}
|
569
|
-
|
570
|
-
|
571
|
-
const calculateFrameProportions = (): void => {
|
572
|
-
let w = isFullscreen ? '100%' : definitiveIframeWidth;
|
573
|
-
let h = isFullscreen ? '100%' : definitiveIframeHeight;
|
574
|
-
let mW = isFullscreen || !isModal ? 'none' : (game.width ? `${Math.floor(game.width)}px`: '1280px');
|
575
|
-
let mH = isFullscreen || !isModal ? 'none' : (game.height ? `${(Math.floor(game.height) + 100)}px` : '720px');
|
576
|
-
|
577
|
-
gameStyle = `width: ${w}; height: ${h}; max-width: ${mW}; max-height: ${mH}`;
|
578
|
-
resizeIframeIfNotVisible();
|
579
|
-
}
|
580
|
-
|
581
|
-
onMount(() => {
|
582
|
-
window.addEventListener('resize', resizeHandler, false);
|
583
|
-
window.addEventListener('message', messageHandler, false);
|
584
|
-
isOnNative = !!isNative(userAgent);
|
585
|
-
|
586
|
-
return () => {
|
587
|
-
removeEventsToDisplayedElements();
|
588
|
-
window.removeEventListener('resize', resizeHandler);
|
589
|
-
window.removeEventListener('message', messageHandler);
|
590
|
-
}
|
591
|
-
});
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
$: lang && setActiveLanguage();
|
596
|
-
$: endpoint && gameid && lang && createGameURL(gameid, true);
|
597
|
-
$: session && userid && endpoint && setSession();
|
598
|
-
$: checksession == 'false' && session && endpoint && setSession();
|
599
|
-
$: translationUrl && setTranslationUrl();
|
600
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
601
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
602
|
-
$: (showModal == 'true') && panicButton && addEventsToDisplayedElements();
|
603
|
-
$: panicButton && addEventsToDisplayedElements();
|
604
|
-
</script>
|
605
|
-
|
606
|
-
<div bind:this={customStylingContainer}>
|
607
|
-
{#if isLoading}
|
608
|
-
<p class="SearchLoading" part="SearchLoading">{$_('gamePage.loading')}</p>
|
609
|
-
{:else}
|
610
|
-
{#if hasErrors}
|
611
|
-
<p class="SearchLoading" part="SearchLoading">500 Error - Internal Server Error.</p>
|
612
|
-
{:else}
|
613
|
-
<div class="GamePageBackground" style="background:{!isModal? `url(${game.backgroundImageUrl})`: ''}; background-size: cover" bind:this={gamePageBackground}>
|
614
|
-
<div class="CasinoGamePageContainer" part="CasinoGamePageContainer" style="background: rgba(0, 0, 0, 0.5)">
|
615
|
-
{#if detailsObtained}
|
616
|
-
{#if mobileView}
|
617
|
-
{#if isLoggedIn}
|
618
|
-
{#if favorites == 'true'}
|
619
|
-
{#if game.isFavored}
|
620
|
-
<div class="FavIconContainer {haspanicbutton == 'true' ? 'FavIconPanicButton' : ''}" part="FavIconContainer {haspanicbutton == 'true' ? 'FavIconPanicButton' : ''}" on:click="{() => toggleFavoriteGame(game.id)}">
|
621
|
-
<svg version="1.1" class="FavoredIcon" part="FavoredIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.481 19.481" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 19.481 19.481">
|
622
|
-
<path style="fill: white" d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
|
623
|
-
</svg>
|
624
|
-
</div>
|
625
|
-
{:else}
|
626
|
-
<div class="FavIconContainer {haspanicbutton == 'true' ? 'FavIconPanicButton' : ''}" part="FavIconContainer {haspanicbutton == 'true' ? 'FavIconPanicButton' : ''}" on:click="{() => toggleFavoriteGame(game.id)}">
|
627
|
-
<svg version="1.1" class="UnfavoredIcon" part="UnfavoredIcon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="20px" y="20px"
|
628
|
-
viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512.001 512.001;" xml:space="preserve"><path style="fill: white" d="M511.266,197.256c-1.764-5.431-6.458-9.388-12.108-10.209l-158.722-23.065L269.452,20.155
|
629
|
-
c-2.527-5.12-7.741-8.361-13.451-8.361c-5.709,0-10.924,3.242-13.451,8.361l-70.988,143.828L12.843,187.047
|
630
|
-
c-5.65,0.821-10.344,4.779-12.108,10.209c-1.765,5.43-0.293,11.391,3.795,15.376l114.848,111.955L92.27,482.67
|
631
|
-
c-0.965,5.627,1.349,11.315,5.968,14.67c4.618,3.355,10.74,3.798,15.797,1.142L256,423.846l141.961,74.637
|
632
|
-
c2.195,1.154,4.591,1.723,6.979,1.723c3.11,0,6.206-0.966,8.818-2.865c4.619-3.356,6.933-9.043,5.968-14.671L392.61,324.587
|
633
|
-
l114.86-111.954C511.559,208.647,513.031,202.686,511.266,197.256z M366.023,308.608c-3.536,3.446-5.15,8.412-4.314,13.278
|
634
|
-
l23.311,135.898l-122.038-64.162c-4.37-2.297-9.591-2.297-13.961,0l-122.045,64.163l23.304-135.9
|
635
|
-
c0.834-4.866-0.779-9.83-4.313-13.276l-98.731-96.244l136.445-19.829c4.886-0.71,9.108-3.778,11.294-8.205L256,60.685
|
636
|
-
l61.023,123.645c2.186,4.427,6.408,7.496,11.294,8.206l136.447,19.828L366.023,308.608z"/></svg>
|
637
|
-
</div>
|
638
|
-
{/if}
|
639
|
-
{/if}
|
640
|
-
<div class="GameDetails" part="GameDetails">
|
641
|
-
<h3>{game.name}</h3>
|
642
|
-
<img src={game.thumbnail} class="GameThumbnail" part="GameThumbnail" alt="game thumbnail" loading="lazy" />
|
643
|
-
<div class="ButtonsContainer" part="ButtonsContainer">
|
644
|
-
<button class="DepositButton" part="DepositButton" on:click='{() => toggleDeposit()}'>{$_('gamePage.deposit')}</button>
|
645
|
-
<button class="PlayNowButton" part="PlayNowButton" on:click='{() => {openGameWindow(game)}}'>{$_('gamePage.playNow')}</button>
|
646
|
-
</div>
|
647
|
-
{#if haspanicbutton === "true"}
|
648
|
-
<div class="PanicSection {(getDevice(userAgent) !== 'PC') ? 'PanicSectionMobile' : ''}" part="PanicSection {(getDevice(userAgent) !== 'PC') ? 'PanicSectionMobile' : ''}">
|
649
|
-
<button class="PanicButton {(getDevice(userAgent) !== 'PC') ? 'PanicButtonMobile' : ''}" class:PanicButtonAnimation={panicLoading} part="PanicButton {(getDevice(userAgent) !== 'PC') ? 'PanicButtonMobile' : ''}" bind:this={panicButton}>{$_('gamePage.breakButton')}</button>
|
650
|
-
</div>
|
651
|
-
{/if}
|
652
|
-
<p>{time}</p>
|
653
|
-
</div>
|
654
|
-
{:else if anonymousFunMode}
|
655
|
-
<div class="GameDetails" part="GameDetails">
|
656
|
-
<h3>{game.name}</h3>
|
657
|
-
<img src={game.thumbnail} class="GameThumbnail" part="GameThumbnail" alt="game thumbnail" loading="lazy" />
|
658
|
-
<div class="ButtonsContainer" part="ButtonsContainer">
|
659
|
-
<button class="LoginButton" part="LoginButton" on:click='{() => toggleLogin()}'>{$_('gamePage.signIn')}</button>
|
660
|
-
<button class="RegisterButton" part="RegisterButton" on:click='{() => toggleRegister()}'>{$_('gamePage.register')}</button>
|
661
|
-
<button class="FullWidthButton" part="FullWidthButton" on:click='{() => {openGameWindow(game)}}'>{$_('gamePage.playForFun')}</button>
|
662
|
-
</div>
|
663
|
-
<p>{time}</p>
|
664
|
-
</div>
|
665
|
-
{:else}
|
666
|
-
<div class="GameDetails" part="GameDetails">
|
667
|
-
<h3>{game.name}</h3>
|
668
|
-
<img src={game.thumbnail} class="GameThumbnail" part="GameThumbnail" alt="game thumbnail" loading="lazy" />
|
669
|
-
<div class="ButtonsContainer" part="ButtonsContainer">
|
670
|
-
<button class="LoginButton" part="LoginButton" on:click='{() => toggleLogin()}'>{$_('gamePage.signIn')}</button>
|
671
|
-
<button class="RegisterButton" part="RegisterButton" on:click='{() => toggleRegister()}'>{$_('gamePage.register')}</button>
|
672
|
-
</div>
|
673
|
-
<p>{time}</p>
|
674
|
-
</div>
|
675
|
-
{/if}
|
676
|
-
{:else}
|
677
|
-
{#if isLoggedIn}
|
678
|
-
<div id="IframeContainer" part="IframeContainer" bind:this={gameFrameContainer} class:FullsScreenLayout={isFullscreen} style="width: {modalFrameWidth}; height: {modalFrameHeight}">
|
679
|
-
<div id="IframeGame" part="IframeGame" bind:this={gameInnerContainer} style="{gameStyle}">
|
680
|
-
<iframe title="Games" id="IframeGame" class="GamesContainer" part="GamesContainer" aria-hidden="false" src={game.launchUrl} bind:this={iframe}/>
|
681
|
-
<div class="BottomGame {haspanicbutton == 'true' ? 'BottomGamePanicSection' : ''}" part="BottomGame {haspanicbutton == 'true' ? 'BottomGamePanicSection' : ''}" bind:this={buttonsContainer}>
|
682
|
-
<button class="DepositButton" part="DepositButton" on:click='{() => toggleDeposit()}'>{$_('gamePage.deposit')}</button>
|
683
|
-
<p class="Time" part="Time" bind:this={timeContainer}><span>{time}</span></p>
|
684
|
-
{#if haspanicbutton === "true"}
|
685
|
-
<div class="PanicSection" part="PanicSection">
|
686
|
-
<button class="Button" class:PanicButtonAnimation={panicLoading} part="Button" bind:this={panicButton}>{$_('gamePage.breakButton')}</button>
|
687
|
-
</div>
|
688
|
-
{/if}
|
689
|
-
{#if isFullscreen}
|
690
|
-
<button class="FullscreenButton" part="FullscreenButton" on:click='{() => handleIframeSize()}'>
|
691
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 31 31"><polygon style="fill:#fff;" points="24.586,27.414 29.172,32 32,29.172 27.414,24.586 32,20 20,20 20,32 "/><polygon style="fill:#fff;" points="0,12 12,12 12,0 7.414,4.586 2.875,0.043 0.047,2.871 4.586,7.414 "/><polygon style="fill:#fff;" points="0,29.172 2.828,32 7.414,27.414 12,32 12,20 0,20 4.586,24.586 "/><polygon style="fill:#fff;" points="20,12 32,12 27.414,7.414 31.961,2.871 29.133,0.043 24.586,4.586 20,0 "/></svg>
|
692
|
-
</button>
|
693
|
-
{:else}
|
694
|
-
<button class="FullscreenButton" part="FullscreenButton" on:click='{() => handleIframeSize()}'>
|
695
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21.414 18.586l2.586-2.586v8h-8l2.586-2.586-5.172-5.172 2.828-2.828 5.172 5.172zm-13.656-8l2.828-2.828-5.172-5.172 2.586-2.586h-8v8l2.586-2.586 5.172 5.172zm10.828-8l-2.586-2.586h8v8l-2.586-2.586-5.172 5.172-2.828-2.828 5.172-5.172zm-8 13.656l-2.828-2.828-5.172 5.172-2.586-2.586v8h8l-2.586-2.586 5.172-5.172z"/></svg>
|
696
|
-
</button>
|
697
|
-
{/if}
|
698
|
-
</div>
|
699
|
-
</div>
|
700
|
-
</div>
|
701
|
-
{:else}
|
702
|
-
{#if funMode}
|
703
|
-
<div id="IframeContainer" part="IframeContainer" bind:this={gameFrameContainer} class:FullsScreenLayout={isFullscreen} style="width: {modalFrameWidth}; height: {modalFrameHeight};">
|
704
|
-
<div id="IframeGame" part="IframeGame" bind:this={gameInnerContainer} style="{gameStyle}">
|
705
|
-
<iframe title="Games" id="IframeGame" class="GamesContainer" part="GamesContainer" aria-hidden="false" src={game.launchUrl} bind:this={iframe}/>
|
706
|
-
<div class="BottomGame" part="BottomGame" bind:this={buttonsContainer}>
|
707
|
-
<div class="ButtonsContainer" part="ButtonsContainer">
|
708
|
-
<button class="LoginButton" part="LoginButton" on:click='{() => toggleLogin()}'>{$_('gamePage.signIn')}</button>
|
709
|
-
<button class="RegisterButton" part="RegisterButton" on:click='{() => toggleRegister()}'>{$_('gamePage.register')}</button>
|
710
|
-
</div>
|
711
|
-
<p class="Time" part="Time" bind:this={timeContainer}><span>{time}</span></p>
|
712
|
-
{#if isFullscreen}
|
713
|
-
<button class="FullscreenButton" part="FullscreenButton" on:click='{() => handleIframeSize()}'>
|
714
|
-
<svg width="24" height="24" viewBox="0 0 31 31"><polygon style="fill:#fff;" points="24.586,27.414 29.172,32 32,29.172 27.414,24.586 32,20 20,20 20,32 "/><polygon style="fill:#fff;" points="0,12 12,12 12,0 7.414,4.586 2.875,0.043 0.047,2.871 4.586,7.414 "/><polygon style="fill:#fff;" points="0,29.172 2.828,32 7.414,27.414 12,32 12,20 0,20 4.586,24.586 "/><polygon style="fill:#fff;" points="20,12 32,12 27.414,7.414 31.961,2.871 29.133,0.043 24.586,4.586 20,0 "/></svg>
|
715
|
-
</button>
|
716
|
-
{:else}
|
717
|
-
<button class="FullscreenButton" part="FullscreenButton" on:click='{() => handleIframeSize()}'>
|
718
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21.414 18.586l2.586-2.586v8h-8l2.586-2.586-5.172-5.172 2.828-2.828 5.172 5.172zm-13.656-8l2.828-2.828-5.172-5.172 2.586-2.586h-8v8l2.586-2.586 5.172 5.172zm10.828-8l-2.586-2.586h8v8l-2.586-2.586-5.172 5.172-2.828-2.828 5.172-5.172zm-8 13.656l-2.828-2.828-5.172 5.172-2.586-2.586v8h8l-2.586-2.586 5.172-5.172z"/></svg>
|
719
|
-
</button>
|
720
|
-
{/if}
|
721
|
-
</div>
|
722
|
-
</div>
|
723
|
-
</div>
|
724
|
-
{:else}
|
725
|
-
<div class="GameDetails" part="GameDetails">
|
726
|
-
<h3>{game.name}</h3>
|
727
|
-
<img src={game.thumbnail} class="GameThumbnail" part="GameThumbnail" alt="game thumbnail" loading="lazy" />
|
728
|
-
<div class="ButtonsContainer" part="ButtonsContainer">
|
729
|
-
<button class="LoginButton" part="LoginButton" on:click='{() => toggleLogin()}'>{$_('gamePage.signIn')}</button>
|
730
|
-
<button class="RegisterButton" part="RegisterButton" on:click='{() => toggleRegister()}'>{$_('gamePage.register')}</button>
|
731
|
-
</div>
|
732
|
-
<p>{time}</p>
|
733
|
-
</div>
|
734
|
-
{/if}
|
735
|
-
{/if}
|
736
|
-
{/if}
|
737
|
-
{/if}
|
738
|
-
</div>
|
739
|
-
</div>
|
740
|
-
{/if}
|
741
|
-
{/if}
|
742
|
-
</div>
|
743
|
-
|
744
|
-
<style lang="scss">
|
745
|
-
|
746
|
-
:host {
|
747
|
-
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
748
|
-
}
|
749
|
-
|
750
|
-
.CasinoGamePageContainer {
|
751
|
-
background: var(--emfe-w-color-contrast, #07072A);
|
752
|
-
margin: 0 auto;
|
753
|
-
height: 100%;
|
754
|
-
max-width: 100%;
|
755
|
-
padding: 0;
|
756
|
-
display: flex;
|
757
|
-
flex-direction: column;
|
758
|
-
justify-content: center;
|
759
|
-
align-items: center;
|
760
|
-
}
|
761
|
-
|
762
|
-
.BottomGame {
|
763
|
-
padding: 4px 16px;
|
764
|
-
min-height: 85px;
|
765
|
-
background-color: var(--emfe-w-color-contrast, #07072A);
|
766
|
-
align-items: center;
|
767
|
-
display: grid;
|
768
|
-
grid-auto-columns: 1fr;
|
769
|
-
grid-auto-rows: 1fr;
|
770
|
-
grid-template-columns: 1fr 1fr 1fr;
|
771
|
-
grid-template-rows: 1fr;
|
772
|
-
gap: 0px 0px;
|
773
|
-
justify-items: center;
|
774
|
-
border-radius:0 0 6px 6px;
|
775
|
-
button {
|
776
|
-
cursor: pointer;
|
777
|
-
}
|
778
|
-
|
779
|
-
&.BottomGamePanicSection {
|
780
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
781
|
-
}
|
782
|
-
|
783
|
-
}
|
784
|
-
|
785
|
-
.DepositButton, .PlayNowButton {
|
786
|
-
border: none;
|
787
|
-
justify-self: left;
|
788
|
-
width: 130px;
|
789
|
-
height: 60px;
|
790
|
-
background-color: var(--emfe-w-color-primary, #D0046C);
|
791
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
792
|
-
border-radius: 2px;
|
793
|
-
}
|
794
|
-
.GameThumbnail {
|
795
|
-
border-radius: 2px;
|
796
|
-
width: 270px;
|
797
|
-
height: 180px;
|
798
|
-
margin-bottom: 20px;
|
799
|
-
}
|
800
|
-
.FullscreenButton {
|
801
|
-
border-radius: 5px;
|
802
|
-
justify-self: end;
|
803
|
-
border: none;
|
804
|
-
width: 60px;
|
805
|
-
height: 60px;
|
806
|
-
background-color: var(--emfe-w-color-primary, #D0046C);
|
807
|
-
}
|
808
|
-
.GameDetails {
|
809
|
-
display: flex;
|
810
|
-
flex-direction: column;
|
811
|
-
align-items: center;
|
812
|
-
}
|
813
|
-
.GameDetails h3 {
|
814
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
815
|
-
font-size: 18px;
|
816
|
-
text-align: center;
|
817
|
-
padding: 0 10px;
|
818
|
-
}
|
819
|
-
|
820
|
-
.ButtonsContainer {
|
821
|
-
display: grid;
|
822
|
-
grid-gap: 16px;
|
823
|
-
grid-template-columns: 1fr 1fr;
|
824
|
-
}
|
825
|
-
.FullWidthButton {
|
826
|
-
grid-column: span 2;
|
827
|
-
}
|
828
|
-
|
829
|
-
.BottomGame .ButtonsContainer {
|
830
|
-
width: 275px;
|
831
|
-
display: flex;
|
832
|
-
justify-self: start;
|
833
|
-
flex-direction: row;
|
834
|
-
justify-content: space-between;
|
835
|
-
|
836
|
-
button {
|
837
|
-
cursor: pointer;
|
838
|
-
}
|
839
|
-
}
|
840
|
-
|
841
|
-
.RegisterButton {
|
842
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
843
|
-
background-color: var(--emfe-w-color-primary, #D0046C);
|
844
|
-
border-radius: 5px;
|
845
|
-
border: none;
|
846
|
-
width: 129px;
|
847
|
-
height: 60px;
|
848
|
-
}
|
849
|
-
.LoginButton {
|
850
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
851
|
-
background-color: var(--emfe-w-color-contrast, #07072A);
|
852
|
-
border-radius: 5px;
|
853
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
854
|
-
width: 129px;
|
855
|
-
height: 60px;
|
856
|
-
}
|
857
|
-
.FullWidthButton {
|
858
|
-
color: var(--emfe-w-color-primary, #D0046C);
|
859
|
-
background-color: var(--emfe-w-color-contrast, #07072A);
|
860
|
-
border-radius: 5px;
|
861
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
862
|
-
width: 100%;
|
863
|
-
height: 60px;
|
864
|
-
}
|
865
|
-
|
866
|
-
.GamesContainer {
|
867
|
-
width: calc(100% - 4px);
|
868
|
-
height: 100%;
|
869
|
-
max-width: calc(100% - 4px);
|
870
|
-
max-height: calc(100% - 100px);
|
871
|
-
}
|
872
|
-
.Time {
|
873
|
-
height: 20px;
|
874
|
-
margin: 0;
|
875
|
-
display: flex;
|
876
|
-
align-items: center;
|
877
|
-
justify-content: center;
|
878
|
-
}
|
879
|
-
svg {
|
880
|
-
fill: var(--emfe-w-color-white, #FFFFFF);
|
881
|
-
}
|
882
|
-
p {
|
883
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
884
|
-
}
|
885
|
-
#IframeContainer {
|
886
|
-
height:100%;
|
887
|
-
max-width:1300px;
|
888
|
-
margin: 10px;
|
889
|
-
display: flex;
|
890
|
-
align-items: center;
|
891
|
-
justify-content: center;
|
892
|
-
}
|
893
|
-
.FullsScreenLayout .GamesContainer {
|
894
|
-
// the use of !important is necessary in order to override the dynamic inline width/height, when in fullscreen mode
|
895
|
-
width: 100%!important;
|
896
|
-
height: calc(100% - 100px)!important;
|
897
|
-
}
|
898
|
-
.FavoredIcon, .UnfavoredIcon {
|
899
|
-
width: 35px;
|
900
|
-
height: 35px;
|
901
|
-
}
|
902
|
-
.FavIconContainer {
|
903
|
-
position: absolute;
|
904
|
-
top: 15px;
|
905
|
-
left: 15px;
|
906
|
-
cursor: pointer;
|
907
|
-
}
|
908
|
-
|
909
|
-
.FavIconPanicButton {
|
910
|
-
margin-top: 45px;
|
911
|
-
}
|
912
|
-
|
913
|
-
.PanicSection {
|
914
|
-
display: flex;
|
915
|
-
align-items: center;
|
916
|
-
gap: 10px;
|
917
|
-
margin: 20px 0;
|
918
|
-
|
919
|
-
.Button {
|
920
|
-
border-radius: 5px;
|
921
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
922
|
-
background-color: var(--emfe-w-color-primary, #D0046C);
|
923
|
-
width: 280px;
|
924
|
-
height: 60px;
|
925
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
926
|
-
cursor: pointer;
|
927
|
-
}
|
928
|
-
}
|
929
|
-
|
930
|
-
// the use of !important is necessary in order to override margin from .PanicSection
|
931
|
-
.PanicSectionMobile {
|
932
|
-
position: absolute;
|
933
|
-
top: 0;
|
934
|
-
left: 0;
|
935
|
-
width: 100%;
|
936
|
-
text-align: center;
|
937
|
-
margin: 10px 0 0 0 !important;
|
938
|
-
}
|
939
|
-
|
940
|
-
.PanicButtonMobile {
|
941
|
-
border-radius: 5px;
|
942
|
-
margin: 0 10px;
|
943
|
-
border: 1px solid var(--emfe-w-color-primary, #D0046C);
|
944
|
-
background-color: var(--emfe-w-color-primary, #D0046C);
|
945
|
-
width: 100% !important;
|
946
|
-
height: 30px;
|
947
|
-
color: var(--emfe-w-color-white, #FFFFFF);
|
948
|
-
cursor: pointer;
|
949
|
-
|
950
|
-
//Remove text selection for panic button on mobile
|
951
|
-
-webkit-touch-callout: none; /* iOS Safari */
|
952
|
-
-webkit-user-select: none; /* Safari */
|
953
|
-
-moz-user-select: none; /* Old versions of Firefox */
|
954
|
-
-ms-user-select: none; /* Internet Explorer/Edge */
|
955
|
-
user-select: none;
|
956
|
-
// End of removing selection properties
|
957
|
-
}
|
958
|
-
|
959
|
-
.PanicButtonAnimation {
|
960
|
-
background: -webkit-linear-gradient(
|
961
|
-
135deg,
|
962
|
-
rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%
|
963
|
-
);
|
964
|
-
|
965
|
-
background: -moz-linear-gradient(
|
966
|
-
135deg,
|
967
|
-
rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%
|
968
|
-
);
|
969
|
-
|
970
|
-
background: -o-linear-gradient(
|
971
|
-
135deg,
|
972
|
-
rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%
|
973
|
-
);
|
974
|
-
|
975
|
-
background-color: var(--emfe-w-color-primary, #D0046C);
|
976
|
-
width: 280px;
|
977
|
-
color: #fff;
|
978
|
-
|
979
|
-
-webkit-animation: bar-animation 2s linear;
|
980
|
-
}
|
981
|
-
|
982
|
-
@-webkit-keyframes bar-animation {
|
983
|
-
0% {
|
984
|
-
background-position: 0;
|
985
|
-
}
|
986
|
-
100% {
|
987
|
-
background-position: 280px;
|
988
|
-
}
|
989
|
-
}
|
990
|
-
</style>
|