@everymatrix/casino-header-controller 0.0.255 → 0.0.258
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-header-controller",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.258",
|
|
4
4
|
"main": "dist/casino-header-controller.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "29d9cee256c6fbdf17d95ed82bc3ebcc62241704"
|
|
42
42
|
}
|
|
@@ -51,7 +51,9 @@
|
|
|
51
51
|
let selectedLanguage:string = '';
|
|
52
52
|
let hamburgerURL:URL;
|
|
53
53
|
let headerURL:URL;
|
|
54
|
+
let logoURL:URL;
|
|
54
55
|
let isLoading:boolean = true;
|
|
56
|
+
let logoFromCms:boolean = false;
|
|
55
57
|
|
|
56
58
|
let mobileView:boolean = false;
|
|
57
59
|
let userAgent:string = window.navigator.userAgent;
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
let language:string = '';
|
|
63
65
|
let languagesArray:Array<string> = [];
|
|
64
66
|
let hamburgerMenuActive:boolean = false;
|
|
67
|
+
let logoPath:string = '';
|
|
65
68
|
|
|
66
69
|
let fallbackSecondaryMenu = [
|
|
67
70
|
{
|
|
@@ -88,11 +91,7 @@
|
|
|
88
91
|
break;
|
|
89
92
|
|
|
90
93
|
case 'myaccount':
|
|
91
|
-
|
|
92
|
-
window.postMessage({ type: 'ReturnToMenu' }, window.location.href);
|
|
93
|
-
} else {
|
|
94
|
-
window.postMessage({type: 'PlayerAccountMenuActive'}, window.location.href);
|
|
95
|
-
}
|
|
94
|
+
window.postMessage({type: 'PlayerAccountMenuActive', isMobile: isMobile(userAgent)}, window.location.href);
|
|
96
95
|
break;
|
|
97
96
|
|
|
98
97
|
case 'deposit':
|
|
@@ -145,6 +144,7 @@
|
|
|
145
144
|
const createCMSUrls = () => {
|
|
146
145
|
headerURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/menu`)
|
|
147
146
|
hamburgerURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/hamburger-menu`);
|
|
147
|
+
logoURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/op-options/style`);
|
|
148
148
|
|
|
149
149
|
headerURL.searchParams.append('device', 'dk');
|
|
150
150
|
headerURL.searchParams.append('env', cmsenv);
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
selectedLanguage = lang.toUpperCase();
|
|
169
169
|
createCMSUrls();
|
|
170
170
|
|
|
171
|
+
getLogo(logoURL);
|
|
171
172
|
getHeaderMenusData(headerURL);
|
|
172
173
|
}
|
|
173
174
|
|
|
@@ -202,6 +203,24 @@
|
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
|
|
206
|
+
const getLogo = (url:any):Promise<any> => {
|
|
207
|
+
logoFromCms = false;
|
|
208
|
+
|
|
209
|
+
return new Promise((resolve, reject) => {
|
|
210
|
+
fetch(url)
|
|
211
|
+
.then((res: any) => res.json())
|
|
212
|
+
.then((data: any) => {
|
|
213
|
+
logoPath = data.logoUrl;
|
|
214
|
+
logoFromCms = true;
|
|
215
|
+
resolve(data);
|
|
216
|
+
}, (err: any) => {
|
|
217
|
+
logoFromCms = false;
|
|
218
|
+
console.error(err);
|
|
219
|
+
reject(err);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
205
224
|
onMount(async () => {
|
|
206
225
|
window.addEventListener('message', messageHandler, false);
|
|
207
226
|
|
|
@@ -243,7 +262,11 @@
|
|
|
243
262
|
{/if}
|
|
244
263
|
</div>
|
|
245
264
|
<div class="HeaderBranding" part="HeaderBranding" on:click={()=>menuAction('lobby')}>
|
|
246
|
-
|
|
265
|
+
{#if logoFromCms}
|
|
266
|
+
<img src={logoPath} alt="Logo">
|
|
267
|
+
{:else}
|
|
268
|
+
<img src={everymatrixLogo} alt="Logo">
|
|
269
|
+
{/if}
|
|
247
270
|
</div>
|
|
248
271
|
|
|
249
272
|
<div class="HeaderTopActions" part="HeaderTopActions">
|
|
@@ -273,7 +296,11 @@
|
|
|
273
296
|
<header class="HeaderWrapper" part="HeaderWrapper">
|
|
274
297
|
<div class="HeaderContainer" part="HeaderContainer">
|
|
275
298
|
<div class="HeaderBranding" part="HeaderBranding" on:click={()=>menuAction('lobby')}>
|
|
276
|
-
|
|
299
|
+
{#if logoFromCms}
|
|
300
|
+
<img src={logoPath} alt="Logo">
|
|
301
|
+
{:else}
|
|
302
|
+
<img src={everymatrixLogo} alt="Logo">
|
|
303
|
+
{/if}
|
|
277
304
|
</div>
|
|
278
305
|
|
|
279
306
|
<nav class="HeaderMainNav" part="HeaderMainNav">
|
|
@@ -338,7 +365,11 @@
|
|
|
338
365
|
</svg>
|
|
339
366
|
</div>
|
|
340
367
|
<div class="HeaderBranding" part="HeaderBranding" on:click={()=>menuAction('lobby')}>
|
|
341
|
-
|
|
368
|
+
{#if logoFromCms}
|
|
369
|
+
<img src={logoPath} alt="Logo">
|
|
370
|
+
{:else}
|
|
371
|
+
<img src={everymatrixLogo} alt="Logo">
|
|
372
|
+
{/if}
|
|
342
373
|
</div>
|
|
343
374
|
|
|
344
375
|
<div class="HeaderTopActions" part="HeaderTopActions">
|
|
@@ -353,7 +384,11 @@
|
|
|
353
384
|
<header class="HeaderWrapper" part="HeaderWrapper">
|
|
354
385
|
<div class="HeaderContainer" part="HeaderContainer">
|
|
355
386
|
<div class="HeaderBranding" part="HeaderBranding" on:click={()=>menuAction('lobby')}>
|
|
356
|
-
|
|
387
|
+
{#if logoFromCms}
|
|
388
|
+
<img src={logoPath} alt="Logo">
|
|
389
|
+
{:else}
|
|
390
|
+
<img src={everymatrixLogo} alt="Logo">
|
|
391
|
+
{/if}
|
|
357
392
|
</div>
|
|
358
393
|
|
|
359
394
|
<nav class="HeaderMainNav" part="HeaderMainNav">
|
|
@@ -387,13 +422,6 @@
|
|
|
387
422
|
<casino-hamburger-menu menuitemsurl={hamburgerURL} {activecategory} {lang} {languageslist}></casino-hamburger-menu>
|
|
388
423
|
|
|
389
424
|
<style lang="scss">
|
|
390
|
-
//This function does a multiplication
|
|
391
|
-
// in order to work with px the
|
|
392
|
-
// same way as working with em
|
|
393
|
-
@function ttp($value) {
|
|
394
|
-
$multiplicator: 16px;
|
|
395
|
-
@return $value * $multiplicator;
|
|
396
|
-
}
|
|
397
425
|
|
|
398
426
|
:host {
|
|
399
427
|
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
@@ -401,7 +429,7 @@
|
|
|
401
429
|
|
|
402
430
|
.HeaderSlider {
|
|
403
431
|
width: 100%;
|
|
404
|
-
height:
|
|
432
|
+
height: 400px;
|
|
405
433
|
}
|
|
406
434
|
|
|
407
435
|
.HeaderWrapper {
|
|
@@ -413,13 +441,16 @@
|
|
|
413
441
|
display: flex;
|
|
414
442
|
flex-direction: row;
|
|
415
443
|
align-items: center;
|
|
416
|
-
height:
|
|
444
|
+
height: 84px;
|
|
417
445
|
margin: 0 auto;
|
|
418
446
|
}
|
|
419
447
|
|
|
420
448
|
.HeaderBranding {
|
|
421
|
-
width:
|
|
422
|
-
cursor: pointer
|
|
449
|
+
width: 150px;
|
|
450
|
+
cursor: pointer;
|
|
451
|
+
img {
|
|
452
|
+
width: 100%;
|
|
453
|
+
}
|
|
423
454
|
}
|
|
424
455
|
|
|
425
456
|
.HeaderMainNav {
|
|
@@ -444,7 +475,7 @@
|
|
|
444
475
|
list-style: none;
|
|
445
476
|
text-transform: uppercase;
|
|
446
477
|
color: var(--emfe-w-color-white, #FFFFFF);
|
|
447
|
-
font-size:
|
|
478
|
+
font-size: 16px;
|
|
448
479
|
align-items: center;
|
|
449
480
|
|
|
450
481
|
.Item:hover {
|
|
@@ -460,7 +491,7 @@
|
|
|
460
491
|
}
|
|
461
492
|
|
|
462
493
|
&.PrimaryMenu {
|
|
463
|
-
gap:
|
|
494
|
+
gap: 10px;
|
|
464
495
|
}
|
|
465
496
|
}
|
|
466
497
|
|
|
@@ -477,24 +508,24 @@
|
|
|
477
508
|
}
|
|
478
509
|
|
|
479
510
|
.ItemLogin {
|
|
480
|
-
border-radius:
|
|
511
|
+
border-radius: 5px;
|
|
481
512
|
background: transparent;
|
|
482
|
-
font-size:
|
|
513
|
+
font-size: 14px;
|
|
483
514
|
border: solid 1px var(--emfe-w-color-white, #FFFFFF);
|
|
484
|
-
height:
|
|
515
|
+
height: 44px;
|
|
485
516
|
text-align: center;
|
|
486
|
-
line-height:
|
|
487
|
-
margin-right:
|
|
517
|
+
line-height: 44px;
|
|
518
|
+
margin-right: 20px;
|
|
488
519
|
cursor: pointer;
|
|
489
520
|
}
|
|
490
521
|
|
|
491
522
|
.ItemRegister, .ItemDeposit {
|
|
492
|
-
border-radius:
|
|
523
|
+
border-radius: 5px;
|
|
493
524
|
background: var(--emfe-w-color-primary, #D0046C);
|
|
494
|
-
font-size:
|
|
495
|
-
height:
|
|
525
|
+
font-size: 14px;
|
|
526
|
+
height: 44px;
|
|
496
527
|
text-align: center;
|
|
497
|
-
line-height:
|
|
528
|
+
line-height: 44px;
|
|
498
529
|
cursor: pointer;
|
|
499
530
|
}
|
|
500
531
|
|
|
@@ -533,8 +564,8 @@
|
|
|
533
564
|
cursor: pointer;
|
|
534
565
|
|
|
535
566
|
svg {
|
|
536
|
-
width:
|
|
537
|
-
height:
|
|
567
|
+
width: 20px;
|
|
568
|
+
height: 20px;
|
|
538
569
|
}
|
|
539
570
|
}
|
|
540
571
|
|
|
@@ -543,12 +574,12 @@
|
|
|
543
574
|
flex-direction: row;
|
|
544
575
|
align-content: flex-start;
|
|
545
576
|
align-items: center;
|
|
546
|
-
height:
|
|
577
|
+
height: 60px;
|
|
547
578
|
list-style: none;
|
|
548
579
|
text-transform: uppercase;
|
|
549
580
|
color: var(--emfe-w-color-white, #FFFFFF);
|
|
550
|
-
font-size:
|
|
551
|
-
max-width:
|
|
581
|
+
font-size: 14px;
|
|
582
|
+
max-width: 1280px;
|
|
552
583
|
margin: 0 auto;
|
|
553
584
|
overflow-y: hidden;
|
|
554
585
|
overflow-x: auto;
|
|
@@ -556,7 +587,7 @@
|
|
|
556
587
|
}
|
|
557
588
|
|
|
558
589
|
.HeaderItemsMenuSecondary .ItemSecondary {
|
|
559
|
-
padding: 0
|
|
590
|
+
padding: 0 15px;
|
|
560
591
|
cursor: pointer;
|
|
561
592
|
transition-duration: 0.15s;
|
|
562
593
|
|
|
@@ -578,17 +609,13 @@
|
|
|
578
609
|
|
|
579
610
|
.HeaderMobileWrapper {
|
|
580
611
|
.HeaderContainer {
|
|
581
|
-
height:
|
|
582
|
-
padding: 0
|
|
583
|
-
gap:
|
|
612
|
+
height: 55px;
|
|
613
|
+
padding: 0 15px;
|
|
614
|
+
gap: 10px;
|
|
584
615
|
}
|
|
585
616
|
|
|
586
617
|
.HeaderBranding {
|
|
587
618
|
width: 80px;
|
|
588
|
-
|
|
589
|
-
img {
|
|
590
|
-
width: 100%;
|
|
591
|
-
}
|
|
592
619
|
}
|
|
593
620
|
|
|
594
621
|
.HeaderItemsMenu {
|
|
@@ -614,7 +641,7 @@
|
|
|
614
641
|
}
|
|
615
642
|
|
|
616
643
|
.ItemLogin {
|
|
617
|
-
margin-right:
|
|
644
|
+
margin-right: 10px;
|
|
618
645
|
}
|
|
619
646
|
}
|
|
620
647
|
</style>
|