@everymatrix/player-account-timeout 1.0.15 → 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/player-account-timeout",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "dist/player-account-timeout.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
|
}
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
export let operator:string = 'Everymatrix';
|
|
9
9
|
export let lang:string = 'en';
|
|
10
|
+
export let clientstyling:string = '';
|
|
11
|
+
export let clientstylingurl:string = '';
|
|
10
12
|
export let translationUrl:string = '';
|
|
11
13
|
|
|
14
|
+
let customStylingContainer:HTMLElement;
|
|
12
15
|
let userAgent:String = window.navigator.userAgent;
|
|
13
16
|
let isMobile = (getDevice(userAgent) === 'PC') ? false : true;
|
|
14
17
|
|
|
@@ -50,37 +53,60 @@
|
|
|
50
53
|
setLocale(lang);
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
const setClientStyling = ():void => {
|
|
57
|
+
let sheet:HTMLElement = document.createElement('style');
|
|
58
|
+
sheet.innerHTML = clientstyling;
|
|
59
|
+
customStylingContainer.appendChild(sheet);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const setClientStylingURL = ():void => {
|
|
63
|
+
let url:URL = new URL(clientstylingurl);
|
|
64
|
+
let cssFile:HTMLElement = document.createElement('style');
|
|
65
|
+
|
|
66
|
+
fetch(url.href)
|
|
67
|
+
.then((res:any) => res.text())
|
|
68
|
+
.then((data:any) => {
|
|
69
|
+
cssFile.innerHTML = data
|
|
70
|
+
|
|
71
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
53
75
|
$: lang && initialLoad();
|
|
76
|
+
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
77
|
+
$: clientstyling && customStylingContainer && setClientStyling();
|
|
54
78
|
$: translationUrl && setTranslationUrl();
|
|
55
79
|
</script>
|
|
56
80
|
|
|
57
|
-
<
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
<g transform="translate(20 158)">
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
81
|
+
<div bind:this={customStylingContainer}>
|
|
82
|
+
<form class="TimeoutWrapper {isMobile ? 'TimeoutWrapperMobile' : ''}" part="TimeoutWrapper {isMobile ? 'TimeoutWrapperMobile' : ''}">
|
|
83
|
+
{#if isMobile}
|
|
84
|
+
<div class="MenuReturnButton" part="MenuReturnButton" on:click={() => toggleScreen()}>
|
|
85
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"><defs><style>.aaa{fill:var(--emfe-w-color-primary, #D0046C);}</style></defs><g transform="translate(-20 -158)">
|
|
86
|
+
<g transform="translate(20 158)">
|
|
87
|
+
<path class="aaa" d="M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z" transform="translate(15 15) rotate(180)"/>
|
|
88
|
+
</g></g>
|
|
89
|
+
</svg>
|
|
90
|
+
<h2 class="TimeoutTitleMobile" part="TimeoutTitleMobile">{$_('timeout.title')}</h2>
|
|
91
|
+
</div>
|
|
92
|
+
{/if}
|
|
93
|
+
<h2 class="TimeoutTitle {isMobile ? 'TimeoutTitleNone' : ''}" part="TimeoutTitle {isMobile ? 'TimeoutTitleNone' : ''}">{$_('timeout.title')}</h2>
|
|
94
|
+
<div class="TimeoutDescription {isMobile ? 'TimeoutDescriptionMobile' : ''}" part="TimeoutDescription {isMobile ? 'TimeoutDescriptionMobile' : ''}">
|
|
95
|
+
<p>{$_('timeout.timeoutTextFirst', { values: { operatorname: operator}})}</p>
|
|
96
|
+
<p>{$_('timeout.timeoutTextSecondary')}</p>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="TimeoutSelectWrapper" part="TimeoutSelectWrapper">
|
|
99
|
+
<select bind:value={timeoutSelected} class="TimeoutSelect {isMobile ? 'TimeoutSelectMobile' : ''}" part="TimeoutSelect {isMobile ? 'TimeoutSelectMobile' : ''}">
|
|
100
|
+
{#each timeoutOptions as {value, text}}
|
|
101
|
+
<option value={value}>{text}</option>
|
|
102
|
+
{/each}
|
|
103
|
+
</select>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="TimeoutActionButtons {isMobile ? 'TimeoutActionButtonsMobile' : ''}" part="TimeoutActionButtons {isMobile ? 'TimeoutActionButtonsMobile' : ''}">
|
|
106
|
+
<button class="TimeoutSave" part="TimeoutSave" on:click={(e) => saveTimeout(e)}>{$_('timeout.save')}</button>
|
|
66
107
|
</div>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<div class="TimeoutDescription {isMobile ? 'TimeoutDescriptionMobile' : ''}" part="TimeoutDescription {isMobile ? 'TimeoutDescriptionMobile' : ''}">
|
|
70
|
-
<p>{$_('timeout.timeoutTextFirst', { values: { operatorname: operator}})}</p>
|
|
71
|
-
<p>{$_('timeout.timeoutTextSecondary')}</p>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="TimeoutSelectWrapper" part="TimeoutSelectWrapper">
|
|
74
|
-
<select bind:value={timeoutSelected} class="TimeoutSelect {isMobile ? 'TimeoutSelectMobile' : ''}" part="TimeoutSelect {isMobile ? 'TimeoutSelectMobile' : ''}">
|
|
75
|
-
{#each timeoutOptions as {value, text}}
|
|
76
|
-
<option value={value}>{text}</option>
|
|
77
|
-
{/each}
|
|
78
|
-
</select>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="TimeoutActionButtons {isMobile ? 'TimeoutActionButtonsMobile' : ''}" part="TimeoutActionButtons {isMobile ? 'TimeoutActionButtonsMobile' : ''}">
|
|
81
|
-
<button class="TimeoutSave" part="TimeoutSave" on:click={(e) => saveTimeout(e)}>{$_('timeout.save')}</button>
|
|
82
|
-
</div>
|
|
83
|
-
</form>
|
|
108
|
+
</form>
|
|
109
|
+
</div>
|
|
84
110
|
|
|
85
111
|
<style lang="scss">
|
|
86
112
|
|