@everymatrix/casino-tournaments-thumbnail-rule 1.0.16 → 1.1.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-tournaments-thumbnail-rule",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "index.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": "62036ada223f2b4f7b64d99a81ab2229ecba3cf1"
|
|
40
40
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<svelte:options tag={null} />
|
|
2
2
|
<script lang="typescript">
|
|
3
|
-
import {onMount} from "svelte";
|
|
4
|
-
import { isMobile, getDevice, checkSession } from 'rvhelper';
|
|
5
3
|
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
|
6
4
|
import { TournamentsRulesTranslations } from './translations';
|
|
7
5
|
|
|
@@ -20,8 +18,12 @@
|
|
|
20
18
|
export let endtime:string;
|
|
21
19
|
export let tcurl:string;
|
|
22
20
|
export let products:string='{}';
|
|
21
|
+
export let clientstyling:string = '';
|
|
22
|
+
export let clientstylingurl:string = '';
|
|
23
23
|
export let translationUrl:string = '';
|
|
24
24
|
|
|
25
|
+
let customStylingContainer: HTMLElement;
|
|
26
|
+
let displayNone:boolean = false;
|
|
25
27
|
|
|
26
28
|
let userAgent = window.navigator.userAgent;
|
|
27
29
|
let casino:any;
|
|
@@ -81,17 +83,38 @@
|
|
|
81
83
|
const setActiveLanguage = () => {
|
|
82
84
|
setLocale(lang);
|
|
83
85
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
|
|
87
|
+
const setClientStyling = ():void => {
|
|
88
|
+
let sheet = document.createElement('style');
|
|
89
|
+
sheet.innerHTML = clientstyling;
|
|
90
|
+
customStylingContainer.appendChild(sheet);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const setClientStylingURL = ():void => {
|
|
94
|
+
displayNone = true;
|
|
95
|
+
|
|
96
|
+
let url:URL = new URL(clientstylingurl);
|
|
97
|
+
let cssFile:HTMLElement = document.createElement('style');
|
|
98
|
+
|
|
99
|
+
fetch(url.href)
|
|
100
|
+
.then((res:any) => res.text())
|
|
101
|
+
.then((data:any) => {
|
|
102
|
+
cssFile.innerHTML = data
|
|
103
|
+
|
|
104
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
105
|
+
setTimeout(() => { displayNone = false; }, 500);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
88
109
|
$: lang && setActiveLanguage();
|
|
89
110
|
$: products && parseProductInfo();
|
|
111
|
+
$: clientstyling && customStylingContainer && setClientStyling();
|
|
112
|
+
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
90
113
|
$: translationUrl && setTranslationUrl();
|
|
91
114
|
</script>
|
|
92
115
|
|
|
93
116
|
|
|
94
|
-
<div class="casino-tournaments-thumbnail-rule" part="casino-tournaments-thumbnail-rule">
|
|
117
|
+
<div class="casino-tournaments-thumbnail-rule" bind:this={customStylingContainer} part="casino-tournaments-thumbnail-rule">
|
|
95
118
|
<div class="RulesRow" part="rule">
|
|
96
119
|
<div class="RuleIcon" part="RuleIcon">
|
|
97
120
|
<img src="{trophySvg}"/>
|