@everymatrix/casino-footer-v2 0.0.365 → 0.0.368
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-footer-v2.js +137 -137
- package/dist/casino-footer-v2.js.map +1 -1
- package/package.json +2 -2
- package/src/CasinoFooterV2.svelte +95 -113
- package/src/translations.js +6 -6
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-footer-v2",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.368",
|
4
4
|
"main": "dist/casino-footer-v2.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": "8de3cc787cc97aec99916dfedb01ec69ac55ba98"
|
40
40
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
export let clockenabled:string = ''; // "true" to enable, anything to disable
|
22
22
|
export let clocksecondsenabled:string = ''; // "true" to display seconds in our default format and to refresh the clock every 1000ms
|
23
23
|
export let clockcustomformat:string = ''; // "false" for defaulting to our format
|
24
|
-
export let clocktext:string = 'Time'; // string preceding clock
|
24
|
+
export let clocktext:string = 'Time:'; // string preceding clock
|
25
25
|
|
26
26
|
export let languageselectorenabled = 'true';
|
27
27
|
export let languageslist:string = 'en, ro';
|
@@ -76,6 +76,7 @@
|
|
76
76
|
let timerInterval:any;
|
77
77
|
|
78
78
|
let customStylingContainer:HTMLElement;
|
79
|
+
let sessionTimerElement:HTMLElement = document.createElement('p');
|
79
80
|
|
80
81
|
setupI18n({ withLocale: 'en', translations: {}});
|
81
82
|
|
@@ -114,6 +115,8 @@
|
|
114
115
|
seconds = Math.floor(milisecondDifference % 60000 / 1000);
|
115
116
|
|
116
117
|
timeString = `${hours > 9 ? hours : '0' + hours}:${minutes > 9 ? minutes : '0' + minutes}:${seconds > 9 ? seconds : '0' + seconds}`;
|
118
|
+
|
119
|
+
sessionTimerElement.innerHTML = ` ${$_('casinoFooter.sessionTimer')} ${timeString}`;
|
117
120
|
|
118
121
|
milisecondDifference += 1000;
|
119
122
|
}, 1000);
|
@@ -207,8 +210,22 @@
|
|
207
210
|
let htmlContent = document.createElement("div");
|
208
211
|
htmlContent.innerHTML = content;
|
209
212
|
element.append(htmlContent);
|
213
|
+
|
214
|
+
//Add clock
|
215
|
+
if (clockenabled === 'true' && element.classList.contains('DetailedLicenses')) {
|
216
|
+
const clockHtml = document.createElement('p');
|
217
|
+
clockHtml.innerHTML = ` ${clocktext} ${time}`
|
218
|
+
|
219
|
+
element.children[0].children[0].append(clockHtml);
|
220
|
+
}
|
221
|
+
//Add session timer
|
222
|
+
if (sessiontimerenabled == 'true' && element.classList.contains('DetailedLicenses')) {
|
223
|
+
|
224
|
+
element.children[0].children[0].append(sessionTimerElement);
|
225
|
+
}
|
210
226
|
}
|
211
227
|
|
228
|
+
|
212
229
|
const setClientStyling = ():void => {
|
213
230
|
let sheet = document.createElement('style');
|
214
231
|
sheet.innerHTML = clientstyling;
|
@@ -241,7 +258,7 @@
|
|
241
258
|
}
|
242
259
|
|
243
260
|
const overlayOptionTrigger = (e:any):void => {
|
244
|
-
let option = e.target.closest('.
|
261
|
+
let option = e.target.closest('.OverlayLanguageOption');
|
245
262
|
|
246
263
|
selectedLanguage = option.getAttribute('data-lang');
|
247
264
|
|
@@ -385,25 +402,7 @@
|
|
385
402
|
{#if licenseDesc}
|
386
403
|
<div class="DetailedLicenses" use:setContent={licenseDesc}></div>
|
387
404
|
<div class="DetailedCustomLicenses" use:setContent={licenseScript}></div>
|
388
|
-
|
389
|
-
<!-- start clock section -->
|
390
|
-
{#if clockenabled==="true"}
|
391
|
-
<div class="ClockContainer">
|
392
|
-
<span class="ClockText">{clocktext}:</span>
|
393
|
-
<span class="ClockTime">{time}</span>
|
394
|
-
</div>
|
395
|
-
{/if}
|
396
|
-
<!-- end clock section -->
|
397
|
-
<!-- start session timer section -->
|
398
|
-
|
399
|
-
{#if sessiontimerenabled}
|
400
|
-
<div class="sessionTimerContainer">
|
401
|
-
<span class="SessionText">{$_('casinoFooter.sessionTimer')} {timeString}</span>
|
402
|
-
</div>
|
403
|
-
{/if}
|
404
|
-
<!-- end session timer section -->
|
405
|
-
</div>
|
406
|
-
{/if}
|
405
|
+
{/if}
|
407
406
|
</div>
|
408
407
|
<!-- end detailed licenses section -->
|
409
408
|
</div>
|
@@ -448,16 +447,16 @@
|
|
448
447
|
</select>
|
449
448
|
|
450
449
|
<!-- Custom dropdown in order to be able to display country flags -->
|
451
|
-
<div class="
|
452
|
-
<button class="
|
450
|
+
<div class="LanguageSelectorOverlay">
|
451
|
+
<button class="DrawerButton" value="{selectedLanguage}" on:click={toggleLanguageDrawer}><img class="LanguageFlag" src={currentLanguageFlag}>{languageDisplayName}
|
453
452
|
<svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
454
453
|
<path opacity="0.4" d="M0.94 0L4.00067 3.05467L7.06 0L8 0.940667L4.00067 4.94133L0 0.940667L0.94 0Z" fill="black"/>
|
455
454
|
</svg>
|
456
455
|
</button>
|
457
|
-
<div bind:this={languageDrawer} class="
|
458
|
-
<ul id="
|
456
|
+
<div bind:this={languageDrawer} class="LanguageDrawer hidden">
|
457
|
+
<ul id="LanguageList">
|
459
458
|
{#each languages as language}
|
460
|
-
<li class="
|
459
|
+
<li class="OverlayLanguageOption" data-lang={language.code} on:click={overlayOptionTrigger}><img class="LanguageFlag" src={language.flag_icon_editable}><a href="javascript:void(0)"><span>{language.name}</span></a></li>
|
461
460
|
{/each}
|
462
461
|
</ul>
|
463
462
|
</div>
|
@@ -535,15 +534,15 @@
|
|
535
534
|
justify-content: center;
|
536
535
|
align-items: center;
|
537
536
|
padding: 20px 0;
|
538
|
-
text-align:
|
537
|
+
text-align: left;
|
539
538
|
max-width: 1100px;
|
540
539
|
p {
|
540
|
+
display: inline;
|
541
541
|
font-family: 'Roboto';
|
542
542
|
font-style: normal;
|
543
543
|
font-weight: 300;
|
544
544
|
font-size: 12px;
|
545
545
|
color: #111;
|
546
|
-
text-align: center;
|
547
546
|
}
|
548
547
|
.LicenseDesc {
|
549
548
|
flex: 1;
|
@@ -555,11 +554,6 @@
|
|
555
554
|
.DetailedLicenses {
|
556
555
|
font-size: 10px;
|
557
556
|
color: var(--emfe-w-color-gray-150, #828282);
|
558
|
-
|
559
|
-
div {
|
560
|
-
text-align: left;
|
561
|
-
white-space: pre-line;
|
562
|
-
}
|
563
557
|
}
|
564
558
|
}
|
565
559
|
}
|
@@ -596,100 +590,88 @@
|
|
596
590
|
}
|
597
591
|
}
|
598
592
|
|
593
|
+
.ItemLanguage {
|
594
|
+
display: none;
|
595
|
+
}
|
599
596
|
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
display: inline;
|
597
|
+
#LanguageList {
|
598
|
+
padding: 0;
|
599
|
+
margin: 0;
|
604
600
|
}
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
display: inline;
|
601
|
+
|
602
|
+
.LanguageSelectorOverlay {
|
603
|
+
position: relative;
|
609
604
|
}
|
610
605
|
|
611
|
-
.
|
612
|
-
|
613
|
-
}
|
614
|
-
|
615
|
-
#languageList {
|
616
|
-
padding: 0;
|
617
|
-
margin: 0;
|
618
|
-
}
|
619
|
-
|
620
|
-
.languageSelectorOverlay {
|
621
|
-
position: relative;
|
622
|
-
}
|
623
|
-
|
624
|
-
.drawerButton {
|
625
|
-
height: 30px;
|
626
|
-
width: 150px;
|
627
|
-
background: inherit;
|
628
|
-
color: inherit;
|
629
|
-
border: none;
|
630
|
-
padding: 0;
|
631
|
-
font: inherit;
|
632
|
-
cursor: pointer;
|
633
|
-
outline: inherit;
|
634
|
-
|
635
|
-
display: flex;
|
636
|
-
justify-content: space-evenly;
|
637
|
-
align-items: center;
|
638
|
-
|
639
|
-
border-radius: 0px;
|
640
|
-
border: 0;
|
641
|
-
}
|
642
|
-
|
643
|
-
.languageDrawer {
|
644
|
-
position:absolute;
|
645
|
-
background: $color-white;
|
606
|
+
.DrawerButton {
|
607
|
+
height: 30px;
|
646
608
|
width: 150px;
|
647
|
-
|
648
|
-
|
649
|
-
|
609
|
+
background: inherit;
|
610
|
+
color: inherit;
|
611
|
+
border: none;
|
612
|
+
padding: 0;
|
613
|
+
font: inherit;
|
614
|
+
cursor: pointer;
|
615
|
+
outline: inherit;
|
650
616
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
margin-right: 8px;
|
658
|
-
background: black;
|
659
|
-
border-radius: 50%;
|
660
|
-
width: 14px;
|
661
|
-
height: 14px;
|
617
|
+
display: flex;
|
618
|
+
justify-content: space-evenly;
|
619
|
+
align-items: center;
|
620
|
+
|
621
|
+
border-radius: 0px;
|
622
|
+
border: 0;
|
662
623
|
}
|
663
624
|
|
664
|
-
.
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
625
|
+
.LanguageDrawer {
|
626
|
+
position:absolute;
|
627
|
+
background: $color-white;
|
628
|
+
width: 150px;
|
629
|
+
top: 30px;
|
630
|
+
padding: 6px 0;
|
631
|
+
left: 3.9px;
|
670
632
|
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
cursor: pointer;
|
675
|
-
top: 6px;
|
676
|
-
left: 12px;
|
633
|
+
&.hidden {
|
634
|
+
display: none;
|
635
|
+
}
|
677
636
|
}
|
678
637
|
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
638
|
+
.LanguageFlag {
|
639
|
+
margin-right: 8px;
|
640
|
+
background: black;
|
641
|
+
border-radius: 50%;
|
642
|
+
width: 16px;
|
643
|
+
height: 16px;
|
644
|
+
}
|
683
645
|
|
684
|
-
|
646
|
+
.OverlayLanguageOption {
|
647
|
+
list-style: none;
|
648
|
+
width: 24px;
|
649
|
+
position: relative;
|
650
|
+
padding: 0;
|
651
|
+
justify-content: center;
|
685
652
|
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
653
|
+
img {
|
654
|
+
position: absolute;
|
655
|
+
z-index: 0;
|
656
|
+
cursor: pointer;
|
657
|
+
top: 6px;
|
658
|
+
left: 12px;
|
659
|
+
}
|
660
|
+
|
661
|
+
a {
|
662
|
+
text-decoration: none;
|
663
|
+
color: black;
|
664
|
+
display: inline-block;
|
665
|
+
|
666
|
+
width: 150px;
|
667
|
+
|
668
|
+
span {
|
669
|
+
width: 100%;
|
670
|
+
display: flex;
|
671
|
+
justify-content: center;
|
672
|
+
margin: 4px 0;
|
673
|
+
}
|
691
674
|
}
|
692
675
|
}
|
693
|
-
}
|
694
676
|
|
695
677
|
</style>
|
package/src/translations.js
CHANGED
@@ -2,37 +2,37 @@ export const CasinoFooterTranslations = {
|
|
2
2
|
en: {
|
3
3
|
casinoFooter: {
|
4
4
|
timeText: `Time`,
|
5
|
-
sessionTimer: '
|
5
|
+
sessionTimer: 'logged in for',
|
6
6
|
}
|
7
7
|
},
|
8
8
|
de: {
|
9
9
|
casinoFooter: {
|
10
10
|
timeText: `Time`,
|
11
|
-
sessionTimer: '
|
11
|
+
sessionTimer: 'logged in for',
|
12
12
|
}
|
13
13
|
},
|
14
14
|
fr: {
|
15
15
|
casinoFooter: {
|
16
16
|
timeText: `Catégories`,
|
17
|
-
sessionTimer: '
|
17
|
+
sessionTimer: 'logged in for',
|
18
18
|
}
|
19
19
|
},
|
20
20
|
ro: {
|
21
21
|
casinoFooter: {
|
22
22
|
timeText: `Ora`,
|
23
|
-
sessionTimer: '
|
23
|
+
sessionTimer: 'online de',
|
24
24
|
}
|
25
25
|
},
|
26
26
|
es: {
|
27
27
|
casinoFooter: {
|
28
28
|
timeText: `Categorías`,
|
29
|
-
sessionTimer: '
|
29
|
+
sessionTimer: 'logged in for',
|
30
30
|
}
|
31
31
|
},
|
32
32
|
pt: {
|
33
33
|
casinoFooter: {
|
34
34
|
timeText: `Categorias`,
|
35
|
-
sessionTimer: '
|
35
|
+
sessionTimer: 'logged in for',
|
36
36
|
}
|
37
37
|
},
|
38
38
|
};
|