@everymatrix/casino-tournaments-limited-controller 1.0.16 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-tournaments-limited-controller",
|
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
|
}
|
@@ -33,6 +33,12 @@
|
|
33
33
|
export let states: string = ''
|
34
34
|
export let filter: string = ''
|
35
35
|
|
36
|
+
export let clientstyling:string = '';
|
37
|
+
export let clientstylingurl:string = '';
|
38
|
+
|
39
|
+
let customStylingContainer: HTMLElement;
|
40
|
+
let displayNone:boolean = false;
|
41
|
+
|
36
42
|
let eventSource = undefined
|
37
43
|
let svgSize: number = 0
|
38
44
|
let href = icon
|
@@ -153,7 +159,27 @@
|
|
153
159
|
postMessageTabLocaleTextUpdate('Finished', `${$_(`tournamentsLimitedController.Finished`)} (${$_('tournamentsLimitedController.last')} 48h)`)
|
154
160
|
}
|
155
161
|
|
156
|
-
|
162
|
+
const setClientStyling = ():void => {
|
163
|
+
let sheet = document.createElement('style');
|
164
|
+
sheet.innerHTML = clientstyling;
|
165
|
+
customStylingContainer.appendChild(sheet);
|
166
|
+
}
|
167
|
+
|
168
|
+
const setClientStylingURL = ():void => {
|
169
|
+
displayNone = true;
|
170
|
+
|
171
|
+
let url:URL = new URL(clientstylingurl);
|
172
|
+
let cssFile:HTMLElement = document.createElement('style');
|
173
|
+
|
174
|
+
fetch(url.href)
|
175
|
+
.then((res:any) => res.text())
|
176
|
+
.then((data:any) => {
|
177
|
+
cssFile.innerHTML = data
|
178
|
+
|
179
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
180
|
+
setTimeout(() => { displayNone = false; }, 500);
|
181
|
+
});
|
182
|
+
}
|
157
183
|
|
158
184
|
onMount(() => {
|
159
185
|
return () => {
|
@@ -167,9 +193,13 @@
|
|
167
193
|
TournamentsTabSwitch: async (data) => __state = data.tab
|
168
194
|
})
|
169
195
|
|
196
|
+
$: endpoint && filter && lang && session && init();
|
197
|
+
$: clientstyling && customStylingContainer && setClientStyling();
|
198
|
+
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
199
|
+
|
170
200
|
</script>
|
171
201
|
|
172
|
-
<div class="casino-tournaments-limited-controller">
|
202
|
+
<div class="casino-tournaments-limited-controller" bind:this={customStylingContainer}>
|
173
203
|
|
174
204
|
<div class="top-wrapper">
|
175
205
|
<div class="svg" bind:clientWidth={svgSize}>
|